Sending mail with attachment

Sending mail with attachment

  

How to send mails with attachment? I am able to send mail with some text. But attachment, I have no idea.

Please help!

Solution

Hi Ananth

In the preparation of the email screen, use the "AttachFileToEmail" control

then add the filename parameter and file content which is the binary data, mostly this data are in your database then the Mime-Type which is the file type like "application/pdf" 



Solution

Hi Ananth,

Ahmed has shown the solution, but I want to add that stuff like this is explained in the online training. Please take all the online courses, they will help you become a better developer with OutSystems.

Kilian Hekhuis wrote:

Hi Ananth,

Ahmed has shown the solution, but I want to add that stuff like this is explained in the online training. Please take all the online courses, they will help you become a better developer with OutSystems.

Hi Kilian,

I have completed "Developing Outsystems  Web Application" Course (Associate developer). But no where sending attachment is mentioned there. If you tell me the exact course, I will watch and learn it :)


Anath,

I'm sure it was in there somewhere, but it might've been the old version 9 ones... I'll ask around.

Ahmed Gad wrote:

Hi Ananth

In the preparation of the email screen, use the "AttachFileToEmail" control

then add the filename parameter and file content which is the binary data, mostly this data are in your database then the Mime-Type which is the file type like "application/pdf" 



Thanks a lot, Ahmed :)


Kilian Hekhuis wrote:

Anath,

I'm sure it was in there somewhere, but it might've been the old version 9 ones... I'll ask around.

Ok Kilian :)


Astoundingly, it doesn't seem to be in the online courses, but it is briefly mentioned in the documentation. My bad!

For reference:

  • Here it mentions attachments shortly ("To attach files to your Email, use the Attach File tool, which you can drag from the Action Flow Toolbox within the Preparation action");
  • Here is the documentation on Attach File;
  • And here is a forum topic that answers the same question (searching the forum is sometimes useful!).