B2B Mail Client Adapter
The B2B Mail Client adapter collects mail from an RFC 1725-compliant mail server, locates an appropriate business process or contract, and start a business process with the data appended.
- Collect mail from an RFC 1725-compliant mail server using the POP3 protocol or an RFC 2060-compliant mail server using the IMAP protocol.
- Locate an appropriate business process or contract.
- Start a business process with the data appended.
For example, your company needs to collect EDI data from a remote mail server using the POP3 protocol. The B2B Mail Client adapter can collect the data from the appropriate mailbox and forward the results through a contract or business process to the translation services.
The following table provides an overview of the B2B Mail Client adapter:
System name | TEST_MAIL_CLIENT_ADAPTER |
---|---|
Graphical Process Modeler (GPM) categories | All Services, System |
Description | Collects mail from an RFC 821-compliant mail server using the POP3 or IMAP protocol. The adapter can start a business process with the mail data it retrieves from the mail server. It can also place all the mail headers in the business process context for further processing. |
Business usage | Polls the mail host at a specific interval to retrieve any mail in the mailbox. If there is no mail, the adapter tries again at the next interval. |
Usage example | Some customers in remote locations send EDI data into a mail server mailbox through SMTP. A business process can be built to collect all new EDI data from the mailbox, and forward the results to the translation services. |
Preconfigured? | No |
Requires third party files? | No |
Platform availability | All supported platforms |
Related services | No |
Application requirements | Requires an RFC 821-compliant mail server and a mail server that supports POP3 or IMAP. The Mail server should be configured to mark mail as SEEN, ANSWERED, NEW, or DELETED when they are requested from B2B Mail Client adapter. |
Initiates business processes? | Yes |
Invocation | Not applicable (internal service) |
Business process context considerations | This adapter can be configured to extract mail header information and place it into process data. |
Returned status values | None |
Restrictions | This adapter will connect to a mail server that supports POP3 or IMAP. The mail server should be RFC 821. |
Persistence level | System default |
Testing considerations | None |
How the B2B Mail Client Adapter Works
- The B2B Mail Client adapter detects data in a specified mailbox and initiates the appropriate business process or contract.
- The Translation service translates the data that was collected by the B2B Mail Client adapter.
Process Data structure
Mail headers, message format, protocol, and contract ID information can be accessed in the process data of the business process document. They are written in the following format:
Mail headers
<ProcessData>
<Mail_Client>
<Headers>
<{field name}>
{---value----}
</{field name}>
</Headers>
<Mail_Client>
</ProcessData>
Process Data Example
The following example shows how the process data might look:
<ProcessData>
<PrimaryDocument SCIObjectID="server:20187f:ef9c723ba3:-7fa4"/>
<Mail_Client>
<Headers>
<From>"Boston, Test1" <test1@mycompany.com></From>
<Subject>xml file</Subject>
<To>"Boston, Test2" <test2@mycompany.com>, "Boston, Test3"
<test2@mycompany.com></To>
<Date>Mon, 12 Aug 2002 10:48:28 +0800</Date>
<Received>by aaasgpxs00.boston.mycompany.comid
<01C241AA.BCF67770@aaasgpxs00.boston.mycompany.com>;
Mon,12 Aug 2002 10:48:29 +0800</Received>
<MIME-Version>1.0</MIME-Version>
<Content-Type>application/octet-stream;
name="smtpSetSubject.xml"</Content-Type>
<Content-Disposition>attachment;
filename="smtpSetSubject.xml"</Content-Disposition>
<Message-ID><EA43E744516FD311A2FB00903B5C499CFF9B64@aaasgpxs00.
boston.mycompany.com>
</Message-ID>
</Headers>
</Mail_Client>
</ProcessData>
Initiating a Business Process that Contains the B2B Mail Client Adapter
You can configure the B2B Mail Client adapter to look up either a predefined contract or a business process. When configuring the adapter, you must fill in Universal Resource Indicator (URI) information. The URI must be the same name that you entered in the User Name field. The URI name is then compared with the Userid (that matches a contract or business process). If a contract match is found, the business process ID is obtained from the contract and the adapter starts that business process. If a business process match is found, the adapter starts that business process.
Configuring Multiple URIs
You can configure multiple URIs when you configure the B2B Mail Client adapter for the first time. If you want to modify a URI, you need to change only the username and password of the URI. The same service configuration is used for multiple users. If you modify the service configuration, you need not change the business process. For example, if you want to bootstrap a business process configured in a second URI, you need to change the username and password for the second URI. The business process fails to bootstrap if the values of URI and User Name fields are different.
Business Process Example
The following example illustrates the B2B Mail Client adapter configuration called TEST_MAIL_CLIENT_ADAPTER being executed by a scheduler:
<process name="Schedule_TEST_MAIL_CLIENT_ADAPTER">
<sequence>
<operation name="Service">
<participant name="TEST_MAIL_CLIENT_ADAPTER"/>
<output message="Xout">
<assign to="." from="*"></assign>
</output>
<input message="Xin">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</process>
Implementing the B2B Mail Client Adapter
- Create a B2B Mail Client adapter configuration. For information, see Managing Services and Adapters.
- Configure the B2B Mail Client adapter. For information, see Configuring
the B2B Mail Client Adapter.Note: When configuring the B2B Mail Client adapter, consider that you cannot pass parameters to the B2B Mail Client adapter from BPML or configure the adapter using the GPM.
- Use the B2B Mail Client adapter in a business process. For information, see Initiating a Business Process that Contains the B2B Mail Client Adapter .
Configuring the B2B Mail Client Adapter
To configure the B2B Mail Client adapter, you must specify settings for the following fields in Sterling B2B Integrator:
Field | Description |
---|---|
Name | Unique and meaningful name for the adapter configuration. Required. |
Description | Meaningful description for this adapter configuration, for reference purposes. Required. |
Select a Group | Select one of the options:
|
Default Message Access Protocol | Select the mail accessing protocol: POP3 or IMAP. Required. |
Default Mail Server | Name of the mail server that Sterling B2B Integrator is to connect to. This is any valid DNS name or a dotted decimal address. |
Default Mail Server Port | Port number that is monitored for activity by the remote system. This must be a valid port and must be 1 - 5 numeric characters. |
User Name | Name that identifies the mailbox to provide when connecting to a mail server. This field is case-sensitive. |
Password | Password used for authentication when connecting to a mail server. This field is case-sensitive. |
Connection Retries | The number of time Mail Client adapter tries to connect to the mail server when there is a connection error. Optional. Minimum valid value is 1 (default is 3). |
Retry Interval (Sec) | The retry interval specifies in seconds. Optional. Minimum valid value is 1 (also the default). |
Max Messages per Session | Maximum number of messages that can be processed per mail download session. Optional. Minimum valid value is 1 (default is 500). |
Remove inbox mail messages | To remove the mail message from the inbox after successfully downloading them. Only configurable if using IMAP protocol. If POP3 is used to access the mailbox, the messages will be removed from the inbox after they have been successfully downloaded. Optional. Valid values are Yes and No. |
SMIME Encryption User Certificate | Not used in this release. Leave at default. |
SMIME Decryption User Certificate (System Store) | Not used in this release. Leave at default. |
SSL | Whether to use SSL to connect to mail server. Optional. Valid values are Must and None. If Must is selected, you must configure the SSL parameters that follow Key Certificate Passphrase. |
Key Certificate Passphrase | The passphrase for the key certificate. Optional. |
Cipher Strength | The cipher strength use for SSL. Optional. Valid values are Strong, Weak, and All. |
Key Certificate (System Store) | Object ID that contains the privatekey and public certificate. The trading partner trusted certificate authority signs the Certificate. Optional. |
CA Certificates | Object ID that contains the trusted certificate authority public certificate. Optional. |
Add New URI | Click add to add a new Uniform Resource Indicator (URI). |
Note: The following four fields are
displayed only if Add New URI is selected:
|
|
URI | Uniform Resource Indicator. Use the same name that is provided in the User Name field above. This field is case-sensitive and is 1 - 8 alphanumeric characters beginning with a letter. |
Business Process | Name of the business process you want the B2B Mail Client adapter to start. This field is valid only if no contract is defined. Either a contract or a business process can be associated with this adapter, but not both. |
Contract | Name of the contract to associate with this adapter. This is valid if no business process is defined. Either a contract or a business process can be associated with this adapter, but not both. |
Send Raw Messages | Whether to send raw messages that preserve the
mail headers in the body of the message. Valid values are Yes and
No. Important: You must enable Send Raw Messages for
the URI invoking the business process in order for the Mail Mime Servicer
to properly parse the message. The mail Mime Service needs the raw
message payload to parse the Mime message.
|
Insert into Process Data | Whether to extract all the mail headers information from the mail message and put them into process data. Required. Valid values are All mail header fields and Selected mail header fields (default is All mail header fields). If Selected mail header fields is chosen, Sterling B2B Integrator will only attempt to extract the values you choose from the following four pages. |
Mail Header: Originator Fields | Only displayed if Selected mail header fields was selected for Insert into Process Data parameter. Select one or more of the following fields to insert into process data: From, Resent-from, Sender, Resent-Sender, Reply-to, Resent-reply-to. Optional. |
Mail Header: Receiver Fields | Only displayed if Selected mail header fields was selected for Insert into Process Data parameter. Select one or more of the following fields to insert into process data: To, Resent-to, CC, Resent-cc, BCC, Resent-bcc. Optional. |
Mail Header: Reference Fields | Only displayed if Selected mail header fields was selected for Insert into Process Data parameter. Select one or more of the following fields to insert into process data: Message-id, Resent-message-id, In-Reply-to, References, Keywords. Optional. |
Mail Header: Other Fields | Only displayed if Selected mail header fields was selected for Insert into Process Data parameter. Select one or more of the following fields to insert into process data: Subject, Comments, Encrypted, Date, Resent-date, Attachments. Optional. |
Run as User | Enter (or select from the list) the user ID to be associated with business process instances of this service. |
Use 24 Hour Clock Display | Select to specify times for this schedule using the 24 hour clock. Leave blank to use 12 hour clock and AM and PM. |
Schedule | Information about scheduling the adapter configuration
to run and to start the specified business process. Valid values:
|