Email Sender
Overview
You can use this Snap to send email messages to an SMTP server in plain text and HTML format. You can also format an HTML table and fill the rows by using data from the input view.

- You can send emails anonymously if your SMTP server allows it. You may leave the Email ID and Password fields empty in that case. You might have to set the Secure connection to 'NONE' if your SMTP server requires. Learn more about setting up this type of account.
-
If your pipeline results in no data being sent to this Snap, no email will be sent.
Write-type Snap
Works in Ultra Tasks if batching is disabled.
Prerequisites
This Snap requires a valid SMTP account to handle access to this endpoint.
Supported versions
Supports TLS version 1.2.
Snap views
| View | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input |
Each document may contain Map data with values for JavaScript expression in the properties and/or data for the HTML table rows. Note:
|
Email Reader |
| Output | Each document contains a Map data which represents one successfully-sent email
message. The following is an example of an output
document:
|
Mapper |
| Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
|
Snap settings
- Expression icon (
): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
| Field / Field set | Type | Description |
|---|---|---|
| Label | String | Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Email Sender Example: Email_Sender |
| To | String/Expression | Required. Specify the email addresses of to-type recipients, its exact format including the address separator may be email-server dependent. It may contain JavaScript expression to be substituted with the data from the input view.
Note: Most
mail systems use a comma as an address separator. If the Email Sender Snap is
having issues with multiple users in the list, verify that you are using the
correct address separator for your mail system. Use the correct address separator
for the To, CC, Bcc, and From fields. Default value: None. Example: [email protected], [email protected] |
| CC | String/Expression |
Specify the email addresses of cc-type (carbon copy) recipients, its exact format including the address separator may be email-server dependent. It may contain JavaScript expression to be substituted with the data from the input view. Default value: None. Example: [email protected], [email protected] |
| Bcc | String/Expression | Specify the email addresses of bcc-type (blind carbon copy) recipients, its exact format including the address separator may be email-server dependent. It may contain JavaScript expression to be substituted with the data from the input view. Default value: None. Example: [email protected], [email protected] |
| From | String/Expression |
Specify the email address of the sender. If there are multiple senders then separate them with a comma. The exact format of the email address including the address separator is email-server dependent. The format may contain a JavaScript expression that must be substituted with the data from the input. Email systems like Microsoft Office 365 enforce having the From field populated. We highly recommend you to populate this field. Default value: N/A Example: [email protected], [email protected] |
| Subject | String/Expression | Specify the subject of email message. Default value: None. Example: Using Email Sender Snap |
| Email Type | Dropdown list |
Required. Select the email type. The available options are:
If the Email type is Plain text or HTML text, the Snap sends one email message per each Document. If the Email type is HTML table, each Document provides one row of information for the HTML table. Default value: HTML text Example: HTML table |
| Template body | String/Expression |
Specify the template of email message body. For the email type of "HTML text" and "HTML table", the Template body should be in HTML format. For "HTML table" type, the Snap expects to find <table> and </table> tags inside the Template body. One Document at the input view corresponds to one row of the HTML table. For each Document, the Snap gets a map data referenced by the Table-data path property and insert a row into the HTML table of the message body. The Table-data path property can also reference an array of map data. The Snap uses the key sets of the map data to compose the column headers of the table. The Snap processes the entire stream of Documents in a batch to generate the superset of keys. See Understanding Expressions in SnapLogic for items to use with the expression toggle (=), but set Email type to Plain Text. Example: The "HTML table" type of the Template body uses Cascading Style Sheets (CSS) for the table style. Gmail does not support CSS in rendering HTML table. You should use in-line style of the HTML table for proper rendering in Gmail. The Snap does not support the in-line style HTML table for individual cells in the table header and rows. Learn more, HTML Table Template Body Default value: None. |
| Attachments |
Specify the URLs of files that you want to attach to your email. If the URL protocol is missing, or if a given path is relative, SnapLogic automatically modifies the URL to start with "sldb:///". The Snap supports SLDB, SFTP, FILE, and SMB file protocols. The username should be included in the URL as in the example below and the password should be entered into the Attachment password property in the email account. The filename part of the URL can contain wildcards, for example, /Alert* so that multiple files can be attached for each row of Attachments property. Note:
Use FILE Protocol for Files
Note:
Using Files in SFTP and SMB
Using files in SLDB
Default value: None. Example: sftp://[email protected]/home/qatest/update_*.xls Snap/sales.xls smb://mydomain;[email protected]:445/snapuser/sample.csv smb://[email protected]:445/snap/sample.csv file:////prod/ImportExport/Barrett/Export/SalesforceCaseAttachments/SnapLogic/MDSTEST/AlertHanderTestAttachment.txt |
|
| Table-data path | String |
Specify the JSON path to the map data which corresponds to a row in the HTML
table. If it references an array of map data, such as
When using just "$" in the Table-data path, the Snap creates an HTML
table, wherein the Template Body has the HTML table tags
( Important: When the Table-data path is an HTML table, the
Snap auto-fills the incoming data. The Snap does not send any email if there is no
input data sent to the Snap.
Note: The document structure needs to be flat. You can do this by using a Structure
Snap before the Email Sender Snap, creating a new map of all the required fields,
and then using "$" as table-data path.
Default value: None. Example: $.table |
| Batch size | Integer | Specify the Batch size property that is used only for the "HTML table" Email
type. The unit of the value is in the number of rows of the HTML table. If the
number of Documents the Snap receives from the input view reaches the given Batch
size, the Snap composes an email message with an HTML table and sends it to the
server. Multiple emails are generated, if needed, to send out all Documents. The
Snap sends the last message at the end of the pipeline execution if any number of
the unsent table rows remain. Default value: 100 Example: 100 |
| Pass through | Checkbox | Select this checkbox to determine if input data should be passed through or
not. If selected, input data will be mapped as a value to the 'original' key in the
output document. Default status: Deselected |
| Retries | Integer | Specify the number of retries when the Snap fails to send email. Initially the
Snap waits for two seconds before retry, and in every subsequent retry, the delay is
doubled up to an hour. Default value: 3 Example: 0 (no retry) |
| Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Execute only Default value: Validate & Execute |
Temporary files
During execution, data processing on Snaplex nodes occurs principally in-memory as streaming and is unencrypted. When processing larger datasets that exceed the available compute memory, the Snap writes unencrypted pipeline data to local storage to optimize the performance. These temporary files are deleted when the pipeline execution completes. You can configure the temporary data's location in the Global properties table of the Snaplex node properties, which can also help avoid pipeline errors because of the unavailability of space. Learn more about Temporary Folder in Configuration Options.
-
+OK Gpop ready for requests from 23.23.38.68 n18mb191678450qav" or
-
"Cannot connect to the endpoint reason: [SYS/PERM] Your account is not enabled for POP access. Please visit your Gmail settings page and enable your account for POP access." or other variations.
You may find an email from Gmail in the inbox titled "Suspicious sign in prevented", which is caused by the execution of Email Reader Snap. You may be able to see more messages from Gmail in your Gmail account web page: Account > Security > Recent Activity > View activity.
There are no settings available in the Gmail account to disable this security feature. Contact Gmail Support if your Gmail account must work in Email Reader Snap.
HTML Table Email Template Body
| Sample HTML Table Type Template body |
|---|
|