Document toolboxDocument toolbox

Email Sink

Description

This unit is a Sink unit type.

The Email Sink unit sends input events through email. If a provider configuration is not set, the unit will use the Devo's Amazon SES service to send the email.

The events enter via the in port and the event details and custom messages are sent to the configured destinations.

In the case of an error, these events are enriched with two additional fields, error and exception, and the event is output through the error port.

Configuration

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

Tab

Field

Description

Tab

Field

Description

General

Name

Enter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.

Description

Enter a description detailing the scope of the unit.

Subject

The field containing the subject of the email. You can include references to input events using the following format:

text %%{variable} text.

Send message as HTML

Mark this option if the message is to be written in HTML format.

Anti-flooding mail threshold

The maximum number of emails that can be sent per time window (the upper threshold is 50 emails). If left empty, the default value will be 10.

Anti-flooding time window

The validation time window (in milliseconds) of the anti-flooding system, with a minimum of 1 minute and a maximum of 1 hour. If left empty, the default value will be 1 minute.

Message

Message to send. You can include references to input events using the following format:

text %%{variable} text

To recipients

Field with the list of recipients

Select the input event field containing the list of recipients.

TOs

Click the plus icon to enter the email addresses of the recipients.

You can collapse and expand the recipients using the icon, reorder using the arrows, or delete using the X icon.

You can also reorder the fields using drag and drop.

CC recipients

Field with the list of recipients

Select the input event field containing the list of recipients to copy in.

CCs

Click the plus icon to enter the email addresses of the recipients you wish to copy in.

You can collapse and expand the recipients using the icon, reorder using the arrows, or delete using the X icon.

You can also reorder the fields using drag and drop.

Provider configuration

SMTP server

The SMTP server to be used when sending emails. If you don't provide one, the unit will use Devo's Amazon SES service to send the emails.

Application token

Application token to be used when authenticating on the SMTP server.

From address

Address to use as the sender of the email.

Input ports

Port

Description

Port

Description

in

 All events enter through this port.

Output ports

Port

Description

Port

Description

error

Signals when an error occurs. Outputs input events enriched with standard error fields.

Example

In this example, we want to send an HTTP request to the randomuser.me API, which retrieves random user information. We need to send this information by email with a specific delay. To do it, we add a Tick unit to fire the request every time we need it. Then, we link it to the input port of the Delayer unit and join its output port to an Http call unit, configured with the API information. Finally, we add an Email Sink unit to send it to the required recipients. 

In the Email Sink unit properties, you must specify the required subject and message of the emails and the list of addresses to which you want to notify.

After saving and starting the Flow, you must click the red button of the Tick unit to begin sending events.

Download this example

You can try this flow by downloading the following JSON file and uploading it to your domain using the Import option: