Dear All,

       I am using Outsystems 11 and i have a requirement to send mail with attachment in it.

I could find many helps in the forums like:

https://www.outsystems.com/forums/discussion/36219/sending-mail-with-attachment/ 

As suggested ,

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" 


I couldn't find the "Attach file" option  or control from my dependencies or in the tool bar.

Please guide me.

Thanks & Regards,

Neha George

A small update I am using Traditional Web Application

Solution

Not sure what you are missing.Just checked and it;s available for me . Add a new email. Add preparation to it. Open preparation and attach file should be available in the left pane.  


Cheers,

Tushar

Solution

Tushar Panpaliya wrote:

Not sure what you are missing.Just checked and it;s available for me . Add a new email. Add preparation to it. Open preparation and attach file should be available in the left pane.  


Cheers,

Tushar

 Thank You so much.My bad...I was searching it in normal preparation not in email preparation.

Appreciate your quick response.

 

Neha, there are two ways you can send email

1. Using the SendEmail component from left panel in any action, but this does not have any option to add attachment.

2. Adding an email to a UI flow like you add screen or a web block. This option like screens or web blocks allows to add preparation action, inside which you get an AttachFile option in left pane.


Hope this helps!

Thanks,

Junaid

Neha George wrote:

Tushar Panpaliya wrote:

Not sure what you are missing.Just checked and it;s available for me . Add a new email. Add preparation to it. Open preparation and attach file should be available in the left pane.  


Cheers,

Tushar

 Thank You so much.My bad...I was searching it in normal preparation not in email preparation.

Appreciate your quick response.

 

 No worries. Make sure you mark the response as solution so that it will help anyone who bumps into this post later. 


Cheers,

Tushar  

 

Tushar Panpaliya wrote:

Not sure what you are missing.Just checked and it;s available for me . Add a new email. Add preparation to it. Open preparation and attach file should be available in the left pane.  


Cheers,

Tushar

 Can you guide me how can i get the ''File Content'' .

I need to fetch details from an entity ,lets say "InsuranceDetails" based on the input parameter  in a web block or a web screen and convert into pdf and attach in the mail.


 Thank You,

Neha

Neha George wrote:

Tushar Panpaliya wrote:

Not sure what you are missing.Just checked and it;s available for me . Add a new email. Add preparation to it. Open preparation and attach file should be available in the left pane.  


Cheers,

Tushar

 Can you guide me how can i get the ''File Content'' .

I need to fetch details from an entity ,lets say "InsuranceDetails" based on the input parameter  in a web block or a web screen and convert into pdf and attach in the mail.


 Thank You,

Neha

 

 You'll have to use something like this  (https://www.outsystems.com/forge/component-overview/209/html2pdfconverter ) to generate a PDF from entity data . And then attach this to the email.

Hi All,

         Thank you all for supporting me with all your inputs.

Can you guide me in attaching a zipped file in a mail?

Below is my code snippet i tried but not working as expected.


And the output i am getting in mail is:


Thanks in advance