Email Send Connector

Version 21.0.7884


Email Send Connector


The Email Send Connector sends messages via an SMTP mail server.

Overview

An Email Send Connector connects to an SMTP server to send files as outgoing email messages. Files processed by the connector can be sent directly as email attachments, or data can be parsed from input files and included in the outgoing message via a scripting template. For more information on creating a scripting template, please see the Templates sections.

Connector Configuration

This section contains all of the configurable connector properties.

Settings Tab

Connection

Settings related to establishing the connection to the SMTP server.

  • Connector Id The static name of the connector. All connector-specific files are held in a folder by the same name within the Data Directory.
  • Connector Description An optional field to provide free-form description of the connector and its role in the flow.
  • Host The hostname or IP address of the SMTP server.
  • Port The port on which to connect to the SMTP server.
  • User The username credential to login to the SMTP server.
  • Password The password credential to login to the SMTP server.
  • SSL Type How to negotiate SSL/TLS when connecting to the server. When set to ‘Explicit’, a plaintext connection will be established and then SSL/TLS will be started with an explicit command. When set to ‘Implicit’, SSL/TLS will immediately be negotiated without first establishing a plaintext connection. When set to ‘Automatic’, the connector will determine the type based on the configured port number.

Message

Settings related to establishing the outgoing email message. The body of the message is specified in the text editor window at the bottom of the section.

  • To: The recipient of the outgoing email message.
  • From: The sender of the outgoing email message. The connector will attempt to automatically determine the value for this field based on the User credential passed to the SMTP server.
  • Subject The subject line for the outgoing message. Subjects can include dynamic data from the outgoing file; for more information please see the Dynamic Subjects section.
  • Message Type Whether to send files that arrive at the connector as attachments, or interpret the message body as a scripting template that reads values from the input file. For more information on creating a scripting template, please see the Template section.

Automation Tab

Automation Settings

Settings related to the automatic processing of files by the connector.

  • Send Whether the connector should automatically send files that arrive at the connector.
  • Retry Interval The interval the connector will wait before retrying a failed send.
  • Retry Maximum Attempts The number of attempts the connector will make to send the message before raising an error.

Advanced Tab

Local Folders

Settings that determine where the connector will read files to send.

  • Input Folder (Send) Files placed here will be sent by the connector. If Send Automation is enabled, the connector will automatically poll this location for files to process.
  • Processed Folder (Sent) After sending, the connector will place a copy of the file here if Save to Sent Folder is enabled. This copy of the file will not be passed along to the next connector in the flow.

Performance

Settings related to the allocation of resources to the connector.

  • Max Workers The maximum number of worker threads that will be consumed from the threadpool to process files on this connector. If set, overrides the default setting from the Profile tab.
  • Max Files The maximum number of files that will be processed by the connector each time worker threads are assigned to the connector. If set, overrides the default setting from the Profile tab.

Other Settings

Settings not included in the previous categories.

  • Excluded Extensions A comma-delimited list of file extensions that should not be processed by the connector.
  • Outgoing Server Public Certificate If the SMTP server is an SSL server, this field should be set to the SSL Certificate that identifies the server. If the server’s certificate is not available, this field can be set to ‘Any Certificate’ to implicitly trust the server’s identity.
  • Parent Connector The connector from which settings should be inherited, unless explicitly overwritten within the existing connector configuration. Must be set to a connector of the same type as the current connector.
  • Log Subfolder Scheme By default, logs for transactions processed by the connector will be stored in the Logs subfolder for the connector. For connectors that process many transactions, it may be desirable to further divide the logs based on the datetime they were generated. When this setting is set to Daily, logs generated on the same day will be grouped in a subfolder;; when this setting is set to Weekly, logs generated in the same week will be grouped in a subfolder; and so on.

  • Log Messages Whether the log entry for a processed file will include a copy of the file itself.
  • Save to Sent Folder Whether files processed by the connector should be copied to the Sent folder for the connector.

Establishing a Connection

The following settings are required to establish a network-level connection to the SMTP server:

  • Host
  • Connector
  • SSL Type

The Test Connection button can verify that the connector can reach the server.

Once network-level connectivity has been established, the following settings are required to login to the server and begin sending emails:

  • User
  • Password

Sending Emails

The Message section of the connector settings determines the email message to be sent.

If Message Type is set to Attachment, then files processed by the connector will be sent as email attachments, and the body of the message should be specified in the Message Text Editor.

If Message Type is set to Template, then the Message Text Editor is treated as an ArcScript template. In the scripting template, values can be parsed out from the files processed by the connector and included in the email body.

Templates

Setting Message Type to Template instructs the connector to interpret the message body as an ArcScript template. The template uses a simple syntax to interact with the input file and retrieve values to use in the email body. These can be combined with static text to generate a standard body format that is dynamically populated based on the files processed by the connector.

Template mode requires that the file being processed by the connector is an XML file.

For example, consider the following input XML document:

<Lead>
  <Company>ABC, Inc.</Company>
  <Email>john@abcinc.com</Email>
  <FirstName>John</FirstName>
  <Description>Blue Widget</Description>
</Lead>  

The values in this XML are made available through the document item in ArcScript. The document item has an attribute for each XML element in the input document, and the attribute names are the same as the underscore-delimited xpath to the element. For example, lead_email is the name of the attribute that stores the value ‘john@abcinc.com’.
Items and attributes are referenced within square brackets [] in ArcScript, using item.attribute syntax: [document.lead_email]

An email body template for the above XML input file might look like this:

Hi [document.lead_firstname],

We saw that you might be interested in the following product:

[document.lead_description]

Would you like to set up a demo to learn more about how we can help you with your work at [document.lead_company]?

This message would generate the following email:

Hi John,

We saw that you might be interested in the following product:

Blue Widget

Would you like to set up a demo to learn more about how we can help you with your work at ABC, Inc.?

Please refer to the Scripting section for more information about ArcScript.

XPath

The ‘xpath’ formatter provides an alternative approach to retrieving dynamic values from the file being emailed. This approach may be more familiar to users already utilizing ArcScript within the application, and requires that the data file is an XML file.

The ‘xpath’ formatter takes as a parameter the xpath within the input XML document to read a value. The formatter must be enclosed in square brackets to indicate the use of a formatter (rather than literal characters). For example, with the following input XML file:

<Items>
  <test>
    <data>5</data>
  </test>
</Items>

The value ‘5’ could be retrieved using the following syntax within an Email Send template:

[xpath(/Items/test/data)]

Dynamic Subjects

The Subject field supports including dynamic information from the outgoing file (e.g. the filename, the connectors that have processed the file, etc).

The file information is made available through the _message item. The _message item has a collection of attributes with a ‘header:’ prefix that corresponds to each of the headers available in the outgoing file. These headers include the filename, any metadata related to processing the file within the Arc Flow, and any custom headers promoted to the file via scripting.

The _message item and the header attributes are referenced in square brackets like any other ArcScript item:

[_message.header:headerName]

For example, the Subject could be set to the following value to include the filename of the outgoing file:

[_message.header:filename]