Email Send Connector

Version 24.2.9039


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. Input 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, see the Templates sections.

Connector Configuration

This section contains all of the configurable connector properties.

Settings Tab

Email Send Configuration

Settings for the name and description of the connector.

  • コネクタId コネクタの静的な一意の識別子。
  • コネクタの種類 コネクタ名とその機能の説明が表示されます。
  • コネクタの説明 コネクタとフローにおけるロールについて自由形式の説明を記載するオプションのフィールド。

Connection

Settings for connecting to the SMTP server.

  • Host The hostname or IP address of the SMTP server.
  • Port The port on which to connect to the SMTP server.
  • User The username to login to the SMTP server.
  • 認証方式 サーバーにログインする際に使用する認証の種類。Basic、OAuth 2.0、NTLM から選択します。オプションは選択した内容に応じて変わります。
  • パスワード (Basic およびNTLM) IMAP サーバーのパスワード。
  • 認証URL (OAuth 2.0) サービスの認証URL。これは、接続ボタンをクリックしてログインし、アプリケーションに権限を付与するときに表示されるURL です。
  • アクセストークンURL (OAuth 2.0) アクセストークンへのURL。
  • クライアントId (OAuth 2.0) OAuth 登録時に割り当てられたクライアントId。
  • クライアントシークレット (OAuth 2.0) OAuth 登録時に割り当てられたクライアントシークレット。
  • スコープ (OAuth 2.0) アプリケーションがアクセス可能なスコープのリスト。
  • コールバックURL (OAuth 2.0) 接続するサービスがアクセスを提供するためのトークンを返すURL。サービスでは許可されるURL をホワイトリストに登録する必要があることが多いため、サービスでアプリケーション登録を設定する際にはこの値を使用します。
  • TLS Type The method used to negotiate SSL/TLS when connecting to the server:
    STARTTLS: A plain text connection is established. Afterwards, SSL/TLS can be started with an explicit command.
    SSL/TLS: Negotiation occurs immediately without first establishing a plain text connection.
    None (Plain Text): A plain text connection is established, and no SSL/TLS is used. Automatic: The connector determines the TLS type based on the configured port number.

Message

Settings for the outgoing email message.

  • To The email address of the outgoing email message recipient. Use a comma-separated list to send to multiple recipients.
  • Show From Opens a field to enter the email address of the sender of the outgoing email message. The connector attempts to automatically determine the value for this field based on the User credential passed to the SMTP server.
  • Add Cc / Add Bcc Opens fields to enter an email address to carbon copy (CC) or blind carbon copy (BCC). Use a comma-separated list to send to multiple recipients.
  • Subject The subject line for the outgoing email message. Subjects can include dynamic data from the outgoing file. For more information, see Dynamic Subjects.
  • Message Type Specifies the method for handling the message:
    Attachment: Send files that arrive at the connector as attachments. See Attachment Mode for more information and an example.
    Template: Interpret the message body as a scripting template that reads values from the input file. For more information on creating a scripting template, see Template Mode.

Automation Tab

Automation Settings

  • Send A toggle that instructs the connector to automatically send files when they are ready.
  • Retry Interval The interval the connector waits before retrying a failed send.
  • Max Attempts The number of attempts the connector makes to send the message. Setting this value to 1 instructs the connector to only make the initial send attempt without retrying. The connector waits the duration specified by Retry Interval between each attempt.

Performance

コネクタへのリソースの割り当てに関する設定。

  • 最大ワーカー数 このコネクタでファイルを処理するためにスレッドプールで消費されるワーカースレッドの最大数。設定された場合、これは設定 > オートメーションページのデフォルト設定をオーバーライドします。
  • 最大ファイル数 コネクタに割り当てられた各スレッドが送信するファイルの最大数。設定された場合、これは設定 > オートメーションページのデフォルト設定をオーバーライドします。

アラートタブ

アラートとサービスレベル(SLA)の設定に関連する設定。

コネクタのE メール設定

サービスレベル(SLA)を実行する前に、通知用のE メールアラートを設定する必要があります。アラートを設定をクリックすると、新しいブラウザウィンドウで設定ページが開き、システム全体のアラートを設定することができます。詳しくは、アラートを参照してください。

サービスレベル(SLA)の設定

サービスレベルでは、フロー内のコネクタが送受信すると予想される処理量を設定し、その量が満たされると予想される時間枠を設定できます。CData Arc は、サービスレベルが満たされていない場合にユーザーに警告するE メールを送信し、SLA を At Risk(危険) としてマークします。これは、サービスレベルがすぐに満たされない場合に Violated(違反) としてマークされることを意味します。これにより、ユーザーはサービスレベルが満たされていない理由を特定し、適切な措置を講じることができます。At Risk の期間内にサービスレベルが満たされなかった場合、SLA はViolated としてマークされ、ユーザーに再度通知されます。

サービスレベルを定義するには、予想処理量の条件を追加をクリックします。

  • コネクタに個別の送信アクションと受信アクションがある場合は、ラジオボタンを使用してSLA に関連する方向を指定します。
  • 検知基準(最小)を、処理が予想されるトランザクションの最小値(量)に設定し、フィールドを使用して期間を指定します。
  • デフォルトでは、SLA は毎日有効です。これを変更するには、毎日のチェックをOFF にし、希望する曜日のチェックをON にします。
  • 期間終了前にステータスを’At Risk’ に設定するタイミングを使用して、SLA がAt Risk としてマークされるようにします。
  • デフォルトでは、通知はSLA が違反のステータスになるまで送信されません。これを変更するには、‘At Risk’ 通知を送信のチェックをON にします。

次の例は、月曜日から金曜日まで毎日1000ファイルを受信すると予想されるコネクタに対して構成されたSLA を示しています。1000ファイルが受信されていない場合、期間終了の1時間前にAt Risk 通知が送信されます。

Advanced Tab

Proxy Settings

Settings for using a proxy with the connector.

  • Use Global A toggle that instructs the connector to use the proxy settings configured under the Settings tab of Arc.
  • Proxy Type The type of proxy to use. Select None to not use a proxy. Otherwise, select Tunnel, SOCKS4, SOCKS5, or HTTP.
  • Proxy Host The proxy server. Formatting depends on the Proxy Type selected.
  • Proxy Port The port to use when connecting to the proxy.
  • Proxy User The username to use when connecting to the proxy.
  • Proxy Password The password for the associated username.
  • Authentication Scheme The protocol to use when connecting to the proxy. Options include Basic, Digest, Proprietary, and NTLM.

Advanced Settings

Extra settings related to processing.

  • Allow ArcScript in Attachment mode Check this to permit the evaluation of ArcScript in the message body when the Message Type is Attachment.
  • Excluded Extensions A comma-delimited list of file extensions that should not be processed by the connector.
  • Outgoing Server Public Certificate TLS / SSL サーバーのID を検証するために使用される公開鍵証明書。ターゲットサーバーがTLS / SSL を使用する場合は、このフィールドにサーバーを識別する証明書を設定します。サーバーの証明書が利用できない場合は、この設定を空白のままにして基盤となるOS / JVM に証明書の検証を実行させるか、任意の証明書 に設定してサーバーのID を暗黙的に信頼させることができます。
  • Extension Map A comma separated list of name-value pairs for determining the Content-Type header value for attachments. For example, .txt=text/plain, .dat=application/edi-x12, .edi=application/edifact
    Note: Including a Content-Type header on input messages overrides the content type determined by this setting.
  • 処理の遅延 インプットフォルダに置かれたファイルの処理を遅延させる時間(秒)。これは旧式の設定です。代替として、ローカルファイルシステムの管理にはFile コネクタの使用がベストプラクティスです。

Message

Message settings determine how the connector searches for messages and manages them after processing. You can save messages to your Sent folder or you can group them based on a Sent folder scheme, as described below.

  • Sent フォルダに保存 チェックすると、コネクタで処理されたファイルをコネクタのSent フォルダにコピーします。
  • Sent Folder Scheme Instructs the connector to group files in the Sent folder according to the selected interval. For example, the Weekly option instructs the connector to create a new subfolder each week and store all sent files for the week in that folder. The blank setting instructs the connector to save all files directly in the Sent folder. For connectors that process many transactions, using subfolders can help keep files organized and improve performance.

Logging

Settings that govern the creation and storage of logs.

  • Log Level The verbosity of logs generated by the connector. When you request support, set this to Debug.
  • Log Subfolder Scheme Instructs the connector to group files in the Logs folder according to the selected interval. For example, the Weekly option instructs the connector to create a new subfolder each week and store all logs for the week in that folder. The blank setting tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders helps keep logs organized and improves performance.
  • Log Messages Check this to have the log entry for a processed file include a copy of the file itself. If you disable this, you might not be able to download a copy of the file from the Input or Output tabs.

Miscellaneous

Miscellaneous settings are for specific use cases.

  • Other Settings Enables you to configure hidden connector settings in a semicolon-separated list (for example, setting1=value1;setting2=value2). Normal connector use cases and functionality should not require the use of these settings.

Establishing a Connection

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

  • Host
  • Port
  • TLS Type

Click the Test Connection button to 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 on the connector Settings page determines the email message to be sent:

  • If Message Type is set to Attachment, files processed by the connector are sent as email attachments, and you should specify the body of the message in the message text editor. See Attachment Mode for more information.
  • If Message Type is set to Template, 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. See Template Mode for more information.

To send multiple attachments in a single email, you need to construct a batch group containing all the attachments you want to include, then send that batch group to the Email Send connector for processing.

Dynamic Subjects

The Subject field supports dynamic information from the outgoing file (for example, the filename and the connectors that have processed the file).

The file information is 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]

Template Mode

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 values can be combined with static text to generate a standard body format that is dynamically populated based on the files processed by the connector.

To use Template mode, the connector must receive an XML file as an input. Templates can only parse information from XML files.

Basic Template

For an example of a template message, consider the following input XML document:

<Lead>
  <Company>ABC, Inc.</Company>
  <Email>[email protected]</Email>
  <FirstName>John</FirstName>
  <Description>Blue Widget</Description>
</Lead>  

This file contains a list of attributes—Company, Email, FirstName, Description—inside of Lead tags. The ArcScript expression to pass the Email field into a message would look like this:

[document.lead_email]

There are three components to this expression:

  • The document item, which points to the currently open file.
  • The lead_email attribute, which points to ‘[email protected]’.
  • Square brackets ([]), which indicate the use of a formatter rather than literal characters.

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

Hi [document.lead_firstname],
<br>
We saw that you might be interested in the following product:
<br>
[document.lead_description]
<br>
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.?

Refer to the Scripting section for more information about ArcScript.

XPath Formatting

The XPath formatter (written as xpath in expressions) provides an alternative approach to retrieving dynamic values from files. This approach might be more familiar to users already using ArcScript elsewhere in Arc. XPath requires input files to be XML files.

Using the same input file example as above:

<Lead>
  <Company>ABC, Inc.</Company>
  <Email>[email protected]</Email>
  <FirstName>John</FirstName>
  <Description>Blue Widget</Description>
</Lead>  

The XPath expression to return the email address would be:

[xpath(/Lead/Email)]

There are three components to this expression:

  • xpath followed by parentheses, which denotes the expression as an XPath expression.
  • The path to the data, with each level delineated by slashes.
  • Square brackets ([]), which indicate the use of a formatter rather than literal characters.
Using the XPath Formatter in Template Mode

Consider the following XML:

<Items>
    <projectName>myProject</projectName>
    <assignee>Bob Ross</assignee>
    <dueDate>02/27/2024</dueDate>
    <resources>
        <description>http://mydomain.com/desc</description>
        <images>http://mydomain.com/images</images>
        <colors>http://mydomain.com/colors</colors>
    </resources>
</Items>

An email body template that uses xpath expressions for the XML input file above might look like this:

Hi [xpath(/Items/assignee)],
<br>
You have a new project to start working on. The name of the project is [xpath(/Items/projectName)].
<br>
All the resources you need can be found at the following links:
<br>
<ul>
  <li>Description: [xpath(/Items/resources/description)]</li>
  <li>Images: [xpath(/Items/resources/images)]</li>
  <li>Colors: [xpath(/Items/resources/colors)]</li>
</ul>
<br>
The due date for this project is [xpath(/Items/dueDate)].

This message would generate the following email:

Hi Bob Ross,

You have a new project to start working on. The name of the project is myProject.

All the resources you need can be found at the following links:

  - Description: http://mydomain.com/desc
  - Images: http://mydomain.com/images
  - Colors: http://mydomain.com/colors

The due date for this project is 02/27/2024.

Code View Editor

The Code View editor enables the creation of custom ArcScript for advanced processing of information from XML files. To open the Code View editor, click the Code View button in the message editor.

In this mode, ArcScript expressions can be used to process multiple data entries at once. The following input file example includes a list of names:

<record>
  <to>Dave</to>
  <items>
    <item>
      <first_name>James</first_name>
      <last_name>Satchel</last_name>
    </item>
    <item>
      <first_name>John</first_name>
      <last_name>Smith</last_name>
    </item>
    <item>
      <first_name>Gina</first_name>
      <last_name>Newberry</last_name>
    </item>
  </items>
</record>

The following message written in the Code View editor incorporates data from this input file using ArcScript:

Hi [document.record_to],
<br>
Here are the people you were asking about:
<br>
<arc:set attr="xml.xpath" value="/record/items/item" />
<arc:call op="xmlDOMSearch" in="xml">
  <arc:set attr="first.names" value="[xpath(first_name)]" />
  <arc:set attr="last.names" value="[xpath(last_name)]" />
  <arc:enum attr="first.names">
    [_value]
  </arc:enum>
  <arc:enum attr="last.names">
    [_value]
  </arc:enum>
  <br>
</arc:call>

This code loops over all of the first and last name values in the input XML file and prints them in the body of the message. When run with the input file above, the final email looks like this:

Hi Dave,

Here are the people you were asking about:

James Satchel
John Smith
Gina Newberry

Refer to the Scripting section for more information about ArcScript and custom expressions.

Attachment Mode

If you set Message Type to Attachment, type your email message body into the editor. If necessary, you can reference headers on the input message to enrich the body of the email. The Email Send connector then evaluates those headers, and attaches the input file to the outbound email.

Note: This relies on a previous step in the flow to promote the necessary values as headers onto the message. Depending on the content of the file, you can do this with various Operations and connector settings.

Consider the following XML:

<Items>
    <projectName>myProject</projectName>
    <assignee>Bob Ross</assignee>
    <dueDate>02/27/2024</dueDate>
    <resources>
        <description>http://mydomain.com/desc</description>
        <images>http://mydomain.com/images</images>
        <colors>http://mydomain.com/colors</colors>
    </resources>
</Items>

The email body might look like this:

Hi [_message.header:assignee],
<br>
You have a new project to start working on. The name of the project is [_message.header:projectname].
<br>
All the resources you need can be found at the following links:
<br>
<ul>
  <li>Description: [_message.header:description]</li>
  <li>Images: [_message.header:images]</li>
  <li>Colors: [_message.header:colors]</li>
</ul>
<br>
The due date for this project is [_message.header:duedate].

This message would generate the following email, and include the input file as an attachment:

Hi Bob Ross,

You have a new project to start working on. The name of the project is myProject.

All the resources you need can be found at the following links:

  - Description: http://mydomain.com/desc
  - Images: http://mydomain.com/images
  - Colors: http://mydomain.com/colors

The due date for this project is 02/27/2024.