cancel
Showing results for 
Search instead for 
Did you mean: 

Mail receiver

Former Member
0 Kudos

Hi,

I have scenario where one input message creates more then one e-mail messages, that are to be sended to different mail receivers. How to do this? Is it possible to do some trick like "IDOC bundling".....

thx

mario

Accepted Solutions (0)

Answers (2)

Answers (2)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>Is it possible to do some trick like "IDOC bundling".....

idoc bundling works for many messages to one

you need one message to many receivers

just specify many receivers in the receiver determination

that's all you need to do

Regards,

Michal Krawczyk

Former Member
0 Kudos

I'm not sure that you understand the problem. So one input message creates more output mails that are t obe sended to different mail adresses. I'm trying to create more XML output messages:

<?xml version="1.0" encoding="UTF-8"?>

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">

<Subject>Subject</Subject>

<From>namea</From>

<To>first_mail</To>

<Reply_To />

<Content_Type>text/plain</Content_Type>

<Content>

Message 1

</Content>

</ns:Mail>

<?xml version="1.0" encoding="UTF-8"?>

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">

<Subject>Subject</Subject>

<From>namea</From>

<To>second_mail</To>

<Reply_To />

<Content_Type>text/plain</Content_Type>

<Content>

Message 2

</Content>

</ns:Mail>

Shabarish_Nair
Active Contributor
0 Kudos

why dont you try a multimapping and create those emails

ref: /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Former Member
0 Kudos

I'm not sure that is the solution, because I could have one mail, two mails, or n different mails. They all have the same structure, like this:

<?xml version="1.0" encoding="UTF-8"?>

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">

<Subject>Subject</Subject>

<From>namea</From>

<To>second_mail</To>

<Reply_To />

<Content_Type>text/plain</Content_Type>

<Content>

Message 2

</Content>

</ns:Mail>

Only differences are in tag <To> and tag <Content>, which are dependent on input message. What I had in mind, was to create one super message, which could consist of more mail messages, and which is once transfered to com.channel and distibuted to mail adresses. I hope I explained my problem/idea.

former_member200962
Active Contributor
0 Kudos
Only differences are in tag <To> and tag <Content>, which are dependent on input message.

maybe this blog by michal help you in configuring the <To> tag:

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

As suggested you will need to implement a multiple-mapping logic in your mapping so that you have n different mail messages generated at the target ..each with a different <To> and <Content> tag....

Regards,

Abhishek.

Former Member
0 Kudos

If you need to send data to different receivers based on the some input data you can go for lookups and fetch the mail address based on the input data ...and then use dynamic configuration for ToHeader field of mail adapter..

but I thing you have to go for multimapping here...

Rajesh

Edited by: Rajesh on May 11, 2009 10:45 AM

Former Member
0 Kudos

If I set on ¸Message Mapping 0..unbounded and also on Interface Mapping, com.chanel complains:

failed to send mail: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found Messages at state 1

Former Member
0 Kudos

yes I too remember the same problem encountered earlier by me during sending mails to dynamic receipients ,so go for multimapping by creating explicit message type (as per your scenario) and route the each message to required receipent

Rajesh

Former Member
0 Kudos

just specify many receivers in the receiver determination

what if number of mail depends on complexity of inbound message? there can be then one mail, maybe 2, 3 or n? is this also possible, any such blog on net?

former_member307485
Active Participant
0 Kudos

Hi Mario,

You can use all mail ids separated by a semicolon ( in the xml structure

Regards,

Divya

Edited by: Divya Nambiar on May 10, 2009 6:27 PM