Skip to Content
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:

http://hostname:portnumber/mdt/amtServlet

If you want to add many lines to the content tag the only way (IMO) is to add it in the mapping because as far as I know you’re not allowed to create many content tags.

To report this post you need to login first.

25 Comments

You must be Logged on to comment or reply to a post.

      1. Karthik Amirtharajan
        Folks,
           I am new to SAP and I am trying to map a XML File data to the mail message definition on a simple scenario.

        What credentials should I give for service marketplace(where Do I need to register?) if I want to download that mail message definition link provided my Michael?

        (0) 
    1. Padmaja Manike
      I am also trying to use a different namespace. but I am getting the following error:

      error occured: [2006-06-13T05:53:00Z] unable to call the mailer; com.sap.aii.messaging.srt.BubbleException: Failed to call the endpoint [null “null”]; nested exception caused by: com.sap.aii.messaging.util.XMLScanException: expecting start tag: {http://sap.com/xi/XI/Mail/30}Mail, but found {http://velux.dk/mail/text_message}Mail at state 1

      Could you please let me know what could be the problem?

      (0) 
  1. Ashish Singh
    I am facing a situation in which I need to enter a  /n –> new line feed or carriage return after some text. How do I do that by changing contents in the payload of the message using Mapping functions or user defined functions??

    Please advice.

    Thanks
    Ashish

    (0) 
  2. Hi Michal,

    Thanks for the wonderful blog…
    Does this work with SP9? I have been trying the same way but somehow itz not workin..

    Thanks
    Sumit

    (0) 

Leave a Reply