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.

Attaching Files

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:

Use email built-in functions to help you handling email addresses.

You are also allowed to customize emails subject as follows:

    1. Add an input parameter to the Email to pass the subject;

    2. Edit the Email and set its Subject property to the input parameter;

    3. 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.

Asynchronous Sending

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.

Error Recovery

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.

See Also

About Emails | Send Email Properties | About the Attach File Tool