cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Line output using Mail Adatper?

Former Member
0 Kudos

I'm sending email using the Mail Package Format and the Mail adapter. Is it possible to create a multi line body to produce a readable email message?

The <Content> tag is used for the email body and adding multiple content tags does not work. Here is the Mail Format for reference.

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">

<Subject></Subject>

<From></From>

<To>name@server.com</To>

<Content>This is the body.</Content>

</ns:Mail>

Thanks for the help.

Brian

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Emmett. While I was waiting for a response I solved the problem using a user defined function very similar to your suggestion.

Brian

Former Member
0 Kudos

Brian,

I had a similar problem. I had a rfc return that could contain multiple rows. Like this...

<return>

<message>Line 1</message>

<message>Line 2</message>

<message>Line 3</message>

<return>

I wanted all the messages to display in the content on their own line so in the mapping I added a advanced function called AddText so my mapping looked like this...

message>AddText>Context

Here's the function I used.

String b = "";

for (int i=0;i<a.length;i++)

b = b + a[ i ] + "\n";

result.addValue(b);

Hope that helps out.

- Emmett

Former Member
0 Kudos

Did you try to use <b>body</b> tag instead of <b>content</b> ?

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">

<Subject></Subject>

<From></From>

<To>name@server.com</To>

<Body>This is the body.

sdfjfdskljf.

</Body>

</ns:Mail>

regards

Shravan

Former Member
0 Kudos

I would still have the issue with the <body> tag. How do I insert Carriage Returns into the content of that field so that the email body is more readable.

Brian