Sunday, December 9, 2007

Mail Adapter (XI) - how to implement dynamic mail address

There've been a few posts on the forum on how to configure
a "dynamic" mail adapter - that is with the possibility of specifying the "To" field dynamically.
This is a short quide on how to do it but please keep in mind that I decided to show
only those steps that may be different from normal/standard XI configuration.

1. Repository configuration

We can start by adding a new namespace to our software component
(this is not the only way but I prefere to have everthing in one component for a better visibility).
So let's add a new namespace: "http://sap.com/xi/XI/Mail/30 "
Then let's add and "External Definition" (Interface Objects) of the mail message from SAP note: 748024
you can download it directly from:

https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt

this is a txt document but change the extension to xsd
and you can upload it as a "Category XSD Message"

image

Then we map our Message type to our uploaded Mail message definition
and let's disable unnecessary fields in the destination message (all except "Subject", "From", "To", "Content").

image

then test the mapping and you should get someting like this:

image

2. Directory configuration

In the directory configuration of the mail adapter choose XIPAYLOAD as a Message Protocol:

image

Add your Connection Parameters and choose "Mail package" in the mail attributes.

image

and that's it:)

If you have XI SP10 you can check the mail adapter status in the Adapter Monitor:

No comments:

Blog Archive