Configuring the Sender Mail Adapter
Use
You configure the sender mail adapter to convert e-mails to XI messages.
Procedure
-
Select the Transport Protocol :
-
You use IMAP4 (Internet Message Access Protocol) to retrieve e-mails from a folder of an e-mail server.
-
You use POP3 (Post Office Protocol Version 3) to retrieve e-mails from an e-mail server.
-
-
Select the Message Protocol :
-
XIALL
The content of the RFC822 e-mail matches the content of the XI message. The XI message is a multipart MIME message with a SOAP envelope as its first part.
-
XIPAYLOAD
The content of the e-mail is put in the payload of the XI message.
-
-
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
1. Define Connection Parameters for the Mail Server
-
Under URL , enter the address of the mail server:
For example: imap://imapserver/XIInBox
-
If the server requires authentication, select Configure User Authentication .
-
Select the Authentication Method :
-
Plain
-
CRAM-MD5
-
-
Specify the User and Password for accessing the server, and confirm.
-
-
Under Poll Interval (min), specify the time interval after which e-mails are to be called on the server.
-
If you have selected IMAP4 as the transport protocol, you can delete messages on the e-mail server after reading.
-
Select Delete messages after reading .
-
Specify a Folder for deleted messages on the server.
-
-
If you want to generate a report for every adapter poll procedure, select Generate fetch report .
An XI message with the following information is generated:
-
Interface namespace: http://sap.com/xi/XI/Mail/30
-
Interface Name: FetchReport
-
2. Define Further Parameters for Message Protocol XIPAYLOAD
If you have selected XIPAYLOAD as the message protocol, make additional entries in the adapter configuration.
More information: Defining Parameters for Message Protocol XIPAYLOAD
3. Define Adapter-Specific Message Properties
-
Select the Advanced tab page.
-
To save adapter-specific attributes in the message header of the XI message, select Set Adapter-Specific Message Properties .
The following mail header fields are added to the XI message header if the sender can make them available, and if you have selected Variable Transport Binding .
-
Mail account user: (technical name: SUser )
-
From: (technical name: SHeaderFROM )
-
To: (technical name: SHeaderTO )
-
Cc: (technical name: SHeaderCC )
-
Subject: (technical name: SHeaderSUBJECT )
-
Reference to the mail that this mail is replying to: (technical name: SHeaderIN-REPLY-TO )
-
Address to which reply is to be sent: (technical name: SHeader-REPLY-TO )
-
Mail client program: (technical name: SHeaderX-MAILER )
-
Send confirmation of receipt: (technical name: SHeaderDISPOSITION-NOTIFICATION-TO )
-
Priority: (technical name: SHeaderPRIORITY )
-
Importance of message: (technical name: SHeaderIMPORTANCE )
-
-
To transfer further header fields, set the relevant indicator.
You can save Variable Headers and their values in the XI message header.
The technical names are XHeaderName1, XHeaderName2, and XHeaderName3.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/Mail .
4. Define the Adapter Status
Set the adapter to Active to enable messages to be exchanged.
5. Define Parameters in Advanced Mode
To specify additional parameters for the adapter configuration, select Advanced Mode .
-
Specify the additional parameter names and parameter values in the table.
-
For the security settings, enter values for the receiver party and receiver communication component (parameters: XI.ReceiverParty, XI.ReceiverService).
-
If you set the parameter IMail.AssumeXMLContent = true in the table, the text of the message is interpreted as XML and included unchanged in the mail package.
If you do not set this parameter, the information is taken from the content type of the MIME header.
If the type there is application/xml or text/xml, the text of the message is copied as XML; otherwise it is copied as text.
-
You can configure additional parameters when IMAP4 is selected as Transport Protocol . These parameters can be configured for the following purposes:
-
To process the e-mails that are marked as read but were not processed due to some failure.
-
To avoid processing the same e-mail multiple times.
When using these parameters, you should select the option to delete messages after reading on the e-mail server and if required, specify a folder for deleted messages on the server.
The parameters are as follows:
-
idmap.useAugmentedMessageId
This option uses the mail Message-ID appended with the mail server URL which itself is appended with the user name to store the e-mail processing status information. This information is used as a duplicate filter.
-
idmap.useNonAugmentedMessageId
This option uses only the mail message-ID to store the e-mail processing status information. This information is used as a duplicate filter.
In addition to the above, you can configure the following parameters:
The below-mentioned parameters are only applicable if one of the parameters ( idmap.useAugmentedMessageId or idmap.useNonAugmentedMessageId ) is set to true.
-
IMail.PersistDuration
Number of days for which the entry of successfully processed mail is retained. By default the entry of successfully processed mail is retained for 30 days. Set this parameter to change the default persist duration. After this duration, if the mail is still present in the mailbox, then it is considered as a new mail and it is processed again.
-
IMail.RetryAttempts
Maximum number of retry attempts for processing each mail. Default value of this parameter is 3. A mail, that is not successfully processed in a polling cycle is taken for processing again in the next polling cycle and the total number of retry attempts is limited by the value of this parameter.
-
IMail.DeleteErrorMails
If this parameter is set to true, then the mail which has exceeded the maximum number of retry attempts, is deleted from mailbox specified in the mail server URL.
By default the value of this parameter is set to false.
-
IMail.ErrorFolder
If IMail.DeleteErrorMails = True and IMail.ErrorFolder = name of an IMAP folder in mailbox, then the mail, which is not processed within the specified number of attempts is copied to this folder and deleted from the mailbox specified in URL.
-
IMail.FetchLimit
You can set this additional parameter to restrict the number of mails fetched by sender mail adapter in one polling interval.
Sometimes the mailbox configured for the sender mail adapter contains large number of unread mails, which exceeds the average expected number of mails in one polling interval. In such a case, processing of all the unread mails in the same polling interval by sender mail adapter degrades the system performance. To avoid this, set value of this parameter to the maximum number of mails to be fetched and processed in one polling interval. The remaining mails exceeding the limit would be processed in the next polling interval.
-
6. Processing Mail Attachments as PI Messages
When the mail adapter is processing mails from the mail server that contain attachments, you can convert the attachments into separate PI messages and send them to the message system.
For the configuration see SAP Note 2040884
.