Email V2
Discover more about the Email V2 component and how to use it on the Digibee Integration Platform.
Email V2 allows you to send simple emails, in HTML format or even with attachments.
Parameters
Take a look at the configuration options for the component. Parameters supported by Double Braces expressions are marked with (DB)
.
Parameter | Description | Default value | Data type |
---|---|---|---|
Account | Necessary for the component to make the authentication of the email server to be used in the dispatch, in case this email service is requested in the authentication. | N/A | String |
SMTP Host | SMTP host of the email server. Eg.: (Gmail: smtp.gmail.com) | String | |
SMTP Port | SMTP port of the email server. Port 587 is generally used, but it can vary according to the email server. | 587 | Integer |
From | Email sender. | N/A | String |
To | Email recipient. If there're multiple recipients, they must be separated by comma. Eg: a@a.com,b@b.com,.... | N/A | String |
CC | Recipients who will receive a copy of the email. If there're multiple recipients, they must be separated by comma. Eg: a@a.com,b@b.com,.... | N/A | String |
BCC | Recipients who will receive a hidden copy of the email. If there're multiple recipients, they must be separated by comma. Eg:a@a.com,b@b.com,... | N/A | String |
Content | Email body. It accepts the use of Freemarker templates to generate dynamic HTML. | N/A | String |
Charset | Charset to be used in the email body dispatch. | UTF-8 | String |
Subject | Subject of the email. | N/A | String |
Authenticated | If the option is enabled, it's mandatory to provide an account with email and password for authentication. If not needed, keep it disabled. | True | Boolean |
Is Over SSL | If enabled, the dispatch is made via SSL. | True | Boolean |
Socket Port | If Is Over SSL is enabled, inform the port used to traffic the message via SSL. | N/A | Integer |
Is Over TLS | If enabled, the dispatch is made via TLS. | False | Boolean |
Force TLSv1.2 | Sets the use of TLS V1.2 as mandatory for connections with email servers. | False | Boolean |
Custom Attachments Specification | If enabled, the form to add attachments will be hidden, and the dispatch in RAW mode may be used, through which you inform the attachments array. | False | Boolean |
Attachments | Message attachments. The specification is made via form. | N/A | Options of Custom Attachments Specification / Array of Objects |
Fail On Error | If enabled, the execution of the pipeline with an error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for "success." | False | Boolean |
In the Attachments parameter, to add images inside the email body, the "cid:" prefix must be informed before the image name. Eg.: <img src"cid: image.png" />
Messages flow
Input
This component doesn't expect any specific input message, only if an expression in Double Braces is informed in some of its fields.
Output
When executing an Email V2 component, the following JSON structure will be generated:
from: sender.
to: recipients.
cc: recipients in copy.
bcc: recipients in hidden copy.
subject: subject.
content: message body. If the message body exceeds 256 characters, the result will be truncated.
charset: charset.
success: if the message is well succeed.
attachments: array with the sent attachments.
The files manipulation inside a pipeline occurs in a protected way. The files can be accessed in a temporary directory that only the pipeline under deployment has access to.
To better understand the messages flow in the Digibee Integration Platform, read our article about Messages processing.
Email V2 in Action
See below how the component responds to a determined situation and its respective configuration.
Sending a text file (xpto.txt) as attachment in RAW mode and the email body having images as well
SMTP Host: smtp.gmail.com
SMTP Port: 587
From: email@gmail.com (this email must be the same one set in the account specified in this component)
Subject: Hello
Content:
Authenticated: enabled
Is Over TLS: enabled
Attachment As Raw: enabled
Attachments:
The result will be:
See how to pass values in a dynamic way using the connector:
In this example, we pass a variable indicating the emission of an invoice:
Notice that the connector allows the use of Double Braces:
JSON Data
Technology
We use Freemarker to make our conversions and transformations in the email body template. Read the Freemarker external documentation to know how to use it.
Last updated