cancel
Showing results for 
Search instead for 
Did you mean: 

Multiline mailmessage with mailadapter

Former Member
0 Kudos

Hi.

I'm generating an message from the payload from the incoming payload.

For example I'm getting the following info to pass on to my message.

Sending System: A

Date: YYYY/MM/DD

Time: HH:MM:SS

I want this information in the body of the message and using mailpackage.

As of now I'm concatenating a long string into the content field.

The result is:

Sending System: A, Date: YYYY/MM/DD, Time: HH:MM:SS

I would like it to be the following:

Sending System: A
Date: YYYY/MM/DD
Time: HH:MM:SS

How do I insert Carriage Returns into the content of that field so that the message body is more readable.

BR

Kalle

Accepted Solutions (0)

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

you can use a UDF to add new lines;

ex:

String input;
input = "";

for(i=0;i<a.length;i++)
{
input = input.concat(a.<i> + '\n' );
}

Former Member
0 Kudos

And how would I use it in the mapping.

Should I make one input string for each field i have in the source structure?

BR

Kalle

stefan_grube
Active Contributor
0 Kudos

When you use Mailpackage, the whole mail body must be part of one single node.

So you have to concatenate a huge string which contains all lines of the source message.