cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic receiver and sender on Mail Module Adapter

Former Member
0 Kudos

Hello

I´m building an email module adapter that I have to set the mail sender and receiver.

I DONT want to do that on message mapping udf, I want to use it directly on my mail module.

The code being used is:

..

Message mailMessage = (Message)imd.getPrincipalData();

...

MessagePropertyKey propTo = new MessagePropertyKey("THeaderTO","http://sap.com/xi/XI/System/Mail");

mailMessage.setMessageProperty(propTo,"toyou@you.com");

MessagePropertyKey propFrom = new MessagePropertyKey("THeaderFROM","http://sap.com/xi/XI/System/Mail");

mailMessage.setMessageProperty(propFrom,"fromme@me.com");

...

But on Audit Log I keep receiving this error: Mail: Error occurred: java.io.IOException: no receiver address specified

Option Set Adapter-Specific Message Attributes is checked

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

anandvithal
Active Participant
0 Kudos

Hi Vitor,

You need to add the variable names in the XHeaderName1,XheaderName2...

Add these parameters for sender and receiver channel and test again.

Thanks,

Anand

Answers (0)