Mail adapter module parameters - rsugio/po GitHub Wiki
N.B. Данные параметры адаптера доступны и корректно работают в зависимости от версии, SP и PL компонент системы. Просьба не ругать авторов, если ваша версия компонент ниже требуемого
N.B. Минимальная версия SP указана ниже для каждой версии NetWeaver. Отражён минимальный SP, который содержит указанную функциональность. Функциональность может быть доступна только начиная с определённого PL в рамках указанной или последующих SP. Детали применимости -- см. релевантные ноты
Описанные ниже параметры ведутся через табличную настройку, скрытую за опцией Advanced Mode.
Parameter | Default | Note | Direction | NW 7.31 | NW 7.40 | NW 7.50 |
---|---|---|---|---|---|---|
Mail.MultupartAttachment | false | 2325512 | Sender | SP020 | SP015 | SP007 |
XI.SetContentTransferEncoding | (null) | 3238045 | Sender | ※ | ※ | SP021 |
XI.ProcessInlineImageAsAttachment | false | ? | Sender | ? | ? | ? |
IMail.refreshToken | (null) | 3169585 | Sender | ※ | ※ | SP020 |
IMail.useTokenProxy | false | 3363528 | Sender | ※ | ※ | SP026 |
IMail.tokenProxyHost | (null) | 3363528 | Sender | ※ | ※ | SP026 |
IMail.tokenProxyPort | (null) | 3363528 | Sender | ※ | ※ | SP026 |
IMail.useGraphAPI | false | 3451616 | Receiver | ※ | ※ | SP028 |
Note 2325512
Symptom
You use SOAP or Mail Sender channel and receive messages with multiple embedded attachments. In the Message Monitor it is visualized as only one attachment. When you try to open it the content is scrambled and not understandable.
Reason and Prerequisites
You need to receive mails and SOAP requests that contain embedded pictures or attachments and PI to visualize them as separate attachments and not like one mixed attachment.
The reason for the previous behavior was a missing functionality in SAP PI to parse and process embedded multipart MIME types. This functionality is provided with the current note.
Solution
In order to enable that functionality you need to follow the below steps:
-
Apply the patch provided in the Support Packages & Patches section of this SAP Note.
-
Mail Adapter – Go to Communication Channel Configuration of the Mail Sender channel / Parameters / Advanced tab, enable Advanced Mode and add the parameter Mail.MultupartAttachment = true
-
SOAP Adapter – Go to NetWeaver Administrator, navigate to Java System Properties / Applications, select com.sap.aii.adapter.soap.app and add the property processMultipartAttachments = true
Note 3169585
Symptom
In case of multi server environment, the OAuth tokens stored in the Cache are not retrieved properly. This leads to failure of the scenario during the runtime (error being: Refresh token has to be generated again).
Reason and Prerequisites
The Mail sender adapter should be configured to use OAuth token in the multi server environment.
Solution
The issue is fixed through code changes. Please apply the patch as present in this note. Addionally a new "Additional Parameter" (as shown in the attached screenshot) is added for the mail sender channel with the name as IMail.refreshToken and the value of refresh token should be stored with this parameter in the mail sender channel (make sure to add the value of token in double quotes, for eg: if the value of refresh token as displayed on browser is 0.ALSKDHLAKSYOQEW.....alsdll, then in channel add following value "0.ALSKDHLAKSYOQEW.....alsdll").
Note 3238045
Symptom
Mails that are having special characters or that are base64 encoded in O365, are not processed correctly by mail adapter when they are picked using OAuth authentication. Mails with special characters gets modified and some of the characters get missed from the XML which is sent for further processing. Mails which are base64 encoded fails with IndexOutOfBounds Exception.
Reason and Prerequisites
Try to process a mail through mail sender adapter using OAuth authentication. The mail should not contain any attachment and should have charset as gb2312. The mail should be base64 encoded.
Solution
The issue is resolved through code changes. To solve the issue please add a parameter with the name as XI.SetContentTransferEncoding and value as binary in the Additional Parameter in the Advanced tab.
Note 3363528
Symptom
Existing proxy in Mail Adapter sender was supported only during mail processing, and not during token generation. This proxy was available from SP28 onwards. We are now downporting these changes, along with some enhancements.
Reason and Prerequisites
Applicable only on Mail Adapter Sender side when used with OAuth.
Solution
Through this enhancement, proxy is now available from SP26 onwards including proxy support during both token generation and mail processing.
Please note that for token generation only http proxy is supported, and for mail processing only socks proxy (which supports proxy authentication as well) is supported.
To configure proxy, please set the following advanced parameters in your channel:
Parameter Name | Parameter Value | Proxy scenario | Proxy Type | Comment |
---|---|---|---|---|
IMail.UseProxy | true/false | mail processing | SOCKS | Configured via additional parameters in SP26, SP27; To be configured via UI fields from SP28 onwards |
IMail.ProxyHost | ip of the proxy server | mail processing | SOCKS | Configured via additional parameters in SP26, SP27; To be configured via UI fields from SP28 onwards |
IMail.ProxyPort | port of the proxy server | mail processing | SOCKS | Configured via additional parameters in SP26, SP27; To be configured via UI fields from SP28 onwards |
IMail.UseProxyAuth | true/false (proxy authentication) | mail processing | SOCKS | Configured via additional parameters in SP26, SP27; To be configured via UI fields from SP28 onwards |
IMail.ProxyUser | username (proxy authentication) | mail processing | SOCKS | Configured via additional parameters in SP26, SP27; To be configured via UI fields from SP28 onwards |
IMail.ProxyPassword | password (proxy authentication) | mail processing | SOCKS | Configured via additional parameters in SP26, SP27; To be configured via UI fields from SP28 onwards |
IMail.useTokenProxy | true/false | token generation | HTTP | Configured via additional parameters in all SPs |
IMail.tokenProxyHost | ip of the proxy server | token generation | HTTP | Configured via additional parameters in all SPs |
IMail.tokenProxyPort | port of the proxy server | token generation | HTTP | Configured via additional parameters in all SPs |
Please refer to the attachment below for a sample configuration of a scenario where proxy is configured for both mail processing and token generation.
Note 3451616
Symptom
When OAuth is used in the mail adapter for authentication by configuring smtp server with port 587, there is a connection failure and hence causes hinderance in further processing.It gives errors like :
Failed to call the endpoint ; nested exception caused by: javax.mail.AuthenticationFailedException
and others.
Reason and Prerequisites
The issue occurs when OAuth authentication is enabled with smtp port 587. The issue was happening because of some limitations in javax mail API. And since javax mail API is depricated and out of support, the issues couldn't be fixed and hence a new API that is the Graph API is now implemented to eliminate the issues.
Solution
The issue is fixed through code changes. The option to use javax mail API or Microsoft Graph API is available at the channel level.
To use Graph API, the parameter IMail.useGraphAPI should be set to true under Additional Parameters tab to indicate to the channel to use Microsoft Graph API for connecting and processing the mails. By default the value of the parameter is false and hence javax mail API will be used. The refresh token has to generated again after setting the parameter to true and by changing the scope in the refresh token url to https://graph.microsoft.com/.default