on 05-05-2011 9:02 PM
Hello people,
(note: all the @ where changed by " at " because of limitations of SDN)
I'm trying to set some adapter specific message attributes (ASMA) in a mail receiver adapter.
Two properties I'm trying to set: THeaderFROM e THeaderREPLY-TO.
The first one is working great, the second one does not work.
My scenario is Soap to Mail. I send a soap message, in the message mapping a user defined function get the mail address (to and reply-to) and set it with DinamicConfiguration like this (hard coded to be simple):
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderREPLY-TO");
conf.put(key, "reply.to at teste.com";);
DynamicConfigurationKey from = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderFROM");
conf.put(from, "from at teste.com";);
As in the documentation, it should work. But the mail message reaches the mailbox with mime header Return-Path = from at teste.com.
Reading all the notes related to mail adapter (and adapter module processing) I found the tool TCPGateway to monitor what is going from adapter engine to the mail server. So I changed a little the scenario to test it and now the scenario is Soap->TCPGateway->MailServer. In the TCPGateway I got this:
EHLO brjgs916.weg.net
MAIL FROM:<from at teste.com>;
RCPT TO:<roberti at mycompany.net>;
DATA
Date: Thu, 5 May 2011 19:55:17 -0000
Subject: mail - teste
To: roberti at mycompany.net
From: from at teste.com
MIME-Version: 1.0
content-id: payload-98c5c8b0775111e090110018714e4a28 at sap.com
Content-Type: text/xml;charset=utf-8
Content-Disposition: attachment;filename="Untitled.xml";
Content-Transfer-Encoding: binary
<?xml version="1.0"; encoding="UTF-8"?>
<ns0:MTP_SAMPLE_MAIL_MESSAGE xmlns:ns0="http://soa.weg.net/sampleMail"><Title>titulo</Title><Body>body a ser preenchido</Body><Footer>footer tambem</Footer></ns0:MTP_SAMPLE_MAIL_MESSAGE>.
QUIT
With this information, I found that something is not right in the mail adapter, because it is not writing the relevant reply-to attributes to the mail message.
Some of you has any idea about it?
Thank you in advance.
waldemar roberti
Edited by: Waldemar Roberti on May 5, 2011 5:02 PM
Hi Roberti,
I see in your log the problem is with THeaderFROM, not from to. Because in To I see:
RCPT TO:<roberti at mycompany.net>;
DATA
Date: Thu, 5 May 2011 19:55:17 -0000
Subject: mail - teste
To: roberti at mycompany.net
So please take a look whether you are having issue with from or reply?
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Satish,
Actually (for testing purposes) I have the email roberti at mycompany.com set in all fields of receiver mail adapter mail attributes (from, to, cc and bcc). I turned all of them on and of and analysed the result. It seems that the information whe put on ASMA overloads the information on these mail attributes. But, in mail attributes, we don't have a field for REPLY-TO, just on ASMA we have this field.
So... the problem is in REPLY-TO. It has not been set in mail adapter, even if I set it with dinamic configuration.
thank you.
Waldemar Roberti
Hi,
Just a thought, please try using the DynamicConfigurationBean to set the Reply to filed.
Thanks
Newa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Newa,
I just tryied with DinamicConfigurationBean.
Analysing the audit log on adapter engine:
DC: processing ...
Success insert key (http://sap.com/xi/XI/System/Mail)THeaderREPLY-TO with value waldemar.roberti at gm.com;
DC: successfully processed
But, nothing new appeared on the message header.
Regards.
Waldemar Roberti
Hi,
conf.put(key, "reply.to at teste.com";);
Try removing ; in the above statement and use like conf.put(key, "reply.to at teste.com");
Regards
Newa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Newa,
thank you for the note, but I don't know where this ";" came from. It is not in my code. Otherwise I would probably not be able to activate the mapping (it should generate an exception when trying to compile the code).
regards
waldemar roberti
Edited by: Waldemar Roberti on May 6, 2011 7:44 AM
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.