Receive Mail
Receive Mail is a process starter activity that polls a mail server for the new mail. After detecting and retrieving a new mail, the Receive Mail activity starts the process.
General
The General tab has the following fields.
Field | Literal Value/Module Property/Process Property | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Name | None | The name to be displayed as the label for the activity in the process. | |||||||||
Host | Yes | The host name or IP address for the mail server. | |||||||||
Port | Yes | The default (110) port used to connect to the POP3 server. | |||||||||
Protocol | No |
The protocol used by receive mail activity to connect to the mail server. The following are the types of protocols:
|
|||||||||
Authentication Type | No |
Select the authentication type. There are two types of authentication:
|
|||||||||
Username | Yes | The username for logging into the server. | |||||||||
Password | Yes |
The password for logging into the POP3 server. When the Authentication Type is selected as OAuth 2.0, the Password field is disabled. When the Protocol is selected as GraphAPI, the Password field is disabled. |
|||||||||
OAuth Configuration | Yes |
The name of the OAuth Configuration resource. In the OauthConfiguration Resource Template wizard, create a resource to connect to OAuth Configuration. This field is enabled only when IMAP and GraphAPI is selected in the Protocol field. For more information, see OAuth Configuration Resource. |
|||||||||
Polling Interval (Sec) | Yes | The polling interval (in seconds) to check for new mail. The default is 5, if no polling interval is specified. | |||||||||
Delete Mail | None | Select this checkbox to delete the mail from the server after the process starter has retrieved it.
Note: To delete mail, place a
Checkpoint activity immediately after the
Receive Mail process starter. This ensures that the message is not lost in the event of a machine failure.
Alternatively, you can leave this field clear. |
|||||||||
Enable Confidentiality | None | This checkbox specifies whether a Secure Sockets Layer (SSL) Client should be used to specify the SSL configuration. When this checkbox is selected, the SSL Client field displays. | |||||||||
SSL Client | Yes | The name of the resource. In the SslClientResource Resource Template wizard, create a resource to connect to the SSL client. |
Test Connection Button
The Test Connection button tests the connection to the specified mail server. Use this button to ensure that your Receive Mail activity is properly configured to receive mail from the specified mail server. This button is enabled only when the POP3 protocol is selected, and theHost, User Name, and Password fields on the General tab are populated.
Description
Provide a short description for the receive mail activity.
Advanced
The Advanced tab contains the following fields:
Field | Description |
---|---|
Sequence Key | Contains an Xpath expression that specifies which process runs in a sequence. Process instances with sequencing keys evaluating to the same value, are run in the sequence the process instance was created. |
Custom Job Id | This field can contain an Xpath expression that specifies a custom ID for the process instance. |
Provide Raw Message | When selected, this field specifies the whole message to be provided in the binary form. The output schema changes to include an element named rawMessage that contains the message instead of bodyText and mimeEnvelopeElements.
The
Receive Mail process starter uses the
Select this checkbox to send the raw message to a Java Invoke activity that uses the Java activation framework to implement the appropriate handlers to process the message. For more information about how the Java activation framework can be used for this purpose, see the
API documentation for
You can also feed the binary message to the
|
Write to File | Select this checkbox to specify that the incoming messages whose body and attachments (or raw message size, if
Provide Raw Message is selected) exceed the specified threshold size. It must be written to a file instead of being stored in memory. You can accept large incoming messages without consuming more memory. The incoming message is written to the file with mail headers when the body and attachment exceed the specified size.
Selecting this checkbox displays the Directory, Creating Non-Existing Directories, and Threshold Data Size(bytes) fields. Do not select to keep the incoming messages in memory. Note: The files created by using this option are not deleted automatically. Manage the storage used by these files and delete them when they are no longer used.
|
Directory | The directory to write messages that are above the specified threshold. The process engine does not attempt to create the directory if the specified directory does not exist. Therefore, create the directory before starting the process engine. |
Create Non-Existing Directories | The directory to write messages that are above the specified threshold.
If the specified directory does not exist, the process engine does not attempt to create the directory. Therefore, select the checkbox to create the directory before starting the process engine. Not selecting this checkbox with one or more non-existing directories in the specified path in the Directory field, raises an exception. |
Threshold Data Size (bytes) | The maximum size (in bytes) of an incoming message that can be kept in memory. Messages larger than the specified size are written to a file in the specified directory. The file name is an output so that the subsequent activities in the process properties can access the file and read its contents.
Specifying zero (0) in this field determines all incoming messages to be saved to a file. |
Output Editor
Incoming messages may contain custom headers. From the Output Editor tab, define a custom schema for the headers of the incoming mail messages. You can also specify any standard header supported by the javax.mail package. For example, X-Mailer or X-Priority. Values of headers in the incoming message populate the corresponding defined output headers of the same name.
Output
The following is the output of the activity.
Output Item | Datatype | Description |
---|---|---|
From | String | The email address of the sender of the email. |
to | String | The recipient list of the email. |
cc | String | The cc (carbon copy) list of the email. |
replyTo | String | The replyTo list of the email. |
subject | String | The subject of the email. |
sentdate | String | The date the email was sent. |
Headers | Complex | This element contains the schema you defined on the Output Editor tab. You can specify custom headers that can be included in the incoming mail messages. |
bodyElement | String | Contains a choice element.
You can either provide the bodyText element or fileName element. |
mimeEnvelopeElement | Complex | This field is available when the
Provide Raw Message checkbox on the
Advanced tab is not selected.
Contains the message attachments. This element contains a repeating element named mimePart that comprises each mime attachment. |
mimeHeaders | Complex | This element contains the mime header for each mimePart.
mimeHeaders contain the following information:
For more information about MIME headers and their syntax, see http://www.faqs.org/rfcs/rfc2045.html. Note: When the contentType is specified as "text/*" (for example, "text/xml"), specify the attachment content in
either the textContent input element or the file name storing the attachment in the fileName input element. When the contentType is anything other than "text/*":
|
binaryContent | fileName | textContent | choice | This element contains the mime attachment. It can be any of the following:
|