cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Mail Adapter in PO 7.40

mg_76
Explorer
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Snavi
Active Participant
0 Kudos

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

mg_76
Explorer
0 Kudos

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

Snavi
Active Participant
0 Kudos

Hi Marco,

yes, you need to separate email address with ;

the Cc parameter in the receiver channel can be used if you don't use the mail package format, and you need to configure static address and mail header information (refer screenshot)

Answers (0)