Outsystems Tutorial\Class\Sample Related to Email and Attachments

Hello,

I don't recall seeing anything related to this topic in any tutorial\class yet. 

My task is to send an email from within a Traditional Web application but will need to select a file that will be the attachment to the email.   

I kept seeing this sample...but it is no longer available. 

https://success.outsystems.com/Documentation/Development_FAQs/How_to_send_emails_with_attachments

Any ideas why no longer available? Or is there something new that I haven't found?


Thank you,

FrankCLT




Hi FrankCLT,

Let me share with you this post with the answer you are looking for.

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

Hope this helps!

Regards,

Nordin

Hello FrankCLT,

you can see this same topic discussion on the following URL, I think it will give you the solution you are looking for.

https://www.outsystems.com/forums/discussion/29128/send-email-with-attachment/


Give it a try and let me know if it worked ;)

Regards,

Tomás 


Thank you for the replies.  The piece I don't follow is the file selection for the user to select from.  This would be what they choose to attach to the email.


In the:::

We have the following attributes::: 


In order to allow user to select a file, I'm not sure of what widget to use to allow selection.


Thanks again,

FrankCLT

Solution

Hi FrankCLT,

The AttachFile widget attaches a single file to an email. In case you want the user to be able to select and attach a file or even multiple files, you would need to implement the logic for that too.
For example, you could create a screen from which you want to allow the user to send emails. This screen would need to contain an Upload widget or a Multiple File Upload component which would enable the user to upload one or more files into your web application. You could for example store these files in a temporary entity which you could display on your screen using a List/TableRecords in order for the user to see which file(s) would be sent as an attachment with the email.
When the email is written and ready to be sent, you just need to loop through that list of files inside the Preparation of your Email screen using a ForEach and the AttachFile widget in order to send the uploaded files as attachments with your email.

Hope this gives you a bit of an idea!

Regards,

Nordin

Solution

Understood....What you suggest will be a fun project.  Thank you for the suggestion.  


FrankCLT

You’re welcome FrankCLT :)