Receive Mail
Receive Mail is a process starter activity that polls a POP3 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.
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 Host, User Name, and Password fields on the General tab are populated.
Advanced
The Advanced tab contains the following fields:
Field | Description |
---|---|
Sequencing Key | Contains an XPath expression that specifies which process runs in a sequence. Process instances with sequencing keys evaluating to the same value, are executed 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 javax.mail API. This API assumes that the content type of the message is multipart/mixed. When the multipart subtype is not mixed (such as multipart/signed or multipart/alternative) or when another content type is used (for example, application/*), the javax.mail API may not correctly parse the message. Select this check box 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 javax.activation and javax.mail. You can also feed the binary message to the javax.mail.MimeMessage constructor in the form of a java.io.InputStream to construct a MimeMessage object. The default javax.mail API handler is used in such a case. |
Write to File | Select this check box 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, 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 body and attachment exceeds the specified size.
Selecting this check box displays the Directory, Creating Non-Existing Directories, and Threshold Data Size(bytes) fields. Do not select to keep the incoming messages in memory. |
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 check box to create the directory before starting the process engine. Not selecting this check box 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 populates the corresponding defined output headers of the same name.
Conversations
You can initiate the conversation here. Click the Add New Conversation button to initiate multiple conversations. For more information about conversations, see Application Development.
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 reply to 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 check box 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. |
binaryContent | fileName | textContent | choice | This element contains the mime attachment. It can be any of the following: |