on 05-10-2016 3:40 PM
Hi Expert,
I configured in my IFLow the use of Mail Adapter and works fine, but now I have the need to extend my interface also use the CC field in the email.
I have already add the parameter CC in my IFlow and in my Operation Mapping as I already do for the parameter TO and this part is ok or that's how it seems.
The problem/error appears in the java mapping when I manage this new parameter and insert it in the structure, see code below:
...
String to = getInputParameters().getString("TO");
String cc = getInputParameters().getString("CC");
...
this.rootElement = new XMLElement("ns1:Mail", XMLElement.XML_TYPE_ELEMENT, null);
this.rootElement.addAttr("xmlns:ns1", "http://sap.com/xi/XI/Mail/30");
if ((sid.equals("I3O")) || (sid.equals("K3O"))) {
this.rootElement.addElement("Subject", 1, " Lieferterminmeldung fuer fehlerhafte Auftraege - " + sid);
} else {
this.rootElement.addElement("Subject", 1, " Lieferterminmeldung fuer fehlerhafte Auftraege");
}
this.rootElement.addElement("From", 1, "a@a.com");
this.rootElement.addElement("To", 1, to);
this.rootElement.addElement("Cc", 1, cc);
this.rootElement.addElement("Content_Type", 1, "text/html");
this.rootElement.addElement("Content", 1, content);
...
The error that I found on Message Monitor is:
Could someone help me figure out where is my mistake?
Thanks in advance for any help
Hi Marco,
When you use mail package, your output structure must adhere to the structure definition of the mail package.
The structure of mail package as in http://sap.com/xi/XI/Mail/30 does not have 'Cc' element in it, so I don't think you can use this element when you use mail package in the receiver channel.
go through the sap help http://help.sap.com/saphelp_nw73/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm for more information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navdeep,
first of all thanks for your reply and the link to the help.
My goal is sent email to multiple recipients and for this reason I thinking on CC element, that is present in the help for Receiver and Sender Mail Adapter (see images below), because some recipients only have to be informed.
By the way, if I can't use this element, I can add multiple recipients in TO element, correct?
Is it necessary that they are separated by a ;, correct?
Extract from Receiver Mail Adapter
Extract from Sender Mail Adapter
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.