Send emails using the Send Email tool, which you can drag onto your canvas from the Action Flow Toolbox or the Process Flow Toolbox, depending on the type of flow you're designing.
To attach files use the Attach File tool in the Preparation of your Emails.
Learn more About the Attach File Tool.
Setting Message Header Fields at Runtime
You're allowed to set runtime data for message header fields using Expressions in Send Email arguments:
From: the email address of the sender;
To: the email address(es) of the recipient(s);
CC: the email address(es) of the recipient(s) of the carbon copy;
BCC: the email address(es) of the blind recipient(s) of the carbon copy.
Use email built-in functions to help you handling email addresses.
You are also allowed to customize emails subject as follows:
Add an input parameter to the Email to pass the subject;
Edit the Email and set its Subject property to the input parameter;
In the Send Email, set the newly created input parameter to an Expression defining the subject of the email.
For advanced usages, where you want further control over the email header, you may also set specific Extended Properties for your email.
At runtime, the Send Email renders the email content, adds it to a sending queue, and continues execution, thus not sending it right away.
It is another process of the OutSystems Platform, the OutSystems Scheduler Service, that picks queued emails and effectively sends them, i.e., emails are asynchronously sent by the OutSystems Platform.
As emails are sent asynchronously in a different session you cannot rely in session data to render emails.
The OutSystems Platform tries to send failed emails for a period of days. When an email continues to fail after this period, the OutSystems Platform quits trying sending it.
By default this period is 2 days, but you may change it in the 'Scheduler.EmailBackoffMaxDays' record in the OSSYS_PARAMETER System table.
About Emails | Send Email Properties | About the Attach File Tool