cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter Module - Get mail of recipient

Former Member
0 Kudos

Hi,

I want to create an module adapter  to retrieve data from the sender adapter and get the email recipient to send the message.

In the logs of SAP PI do not see this information to get through to java programming.

Is it possible?

Regards

Marcelo Macedo

Accepted Solutions (1)

Accepted Solutions (1)

former_member193386
Active Contributor
0 Kudos

Hi Marcelo

What a kind of sender adapter You would like to use to this solution? I ask you about it because hava  a lot ways to pass values using system variables for example

Former Member
0 Kudos
Hi Carlos,
I want the address of electronic mail through the Mail Sender Adapter.
I'm thinking of using the instruction:
DynamicConfiguration dynConf = (DynamicConfiguration)param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dynKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail","SHeaderFROM");
String keyValue = dynConf.get(dynKey);
The logic is correct?
Regards
Marcelo Macedo
former_member193386
Active Contributor
0 Kudos

Why You dont use XIPAYLOAD xsd ?

Former Member
0 Kudos

Carlos,

Because the customer need create a directory with name of mail. i see funny but

Regards

Marcelo Macedo

former_member193386
Active Contributor
0 Kudos

Ok, it is easy, in file sender adapter you activate the message atributes, one these are the directory, you can get the name of these atributs by the Dynamic configration objects like you wrote

Former Member
0 Kudos

Hi.

As Carlos said.: you need to activate the dynamic parameters (Set Adapter -Specific Message Attribute) on Sender Adapter.

The above code is ok. however if you want to use module you can try with the above code . ( >= PI 7.1)

public ModuleData process(ModuleContext moduleContext,ModuleData inputModuleData) throws ModuleException {

Message msg = (Message) inputModuleData.getPrincipalData();

String sFromMail = (String)msg.getMessageProperty(new MessagePropertyKey("SHeaderFROM", "http://sap.com/xi/XI/System/Filehttp://sap.com/xi/XI/System/Mail"))"))

Regards

Lucho

Answers (0)