cancel
Showing results for 
Search instead for 
Did you mean: 

More than 1 line in the content of a mail

inigo_sacramento
Participant
0 Kudos

Hi .

I'm using mail package in mail adapter.

Te problem is that i don't know how to set more than one line in the field context (the body of the email).

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

did you try the sample from my previous response?

this is the only way I believe

REgards,

michal

inigo_sacramento
Participant
0 Kudos

Hi Michal.

I've made a function that pick al the rows of the original payload.

Each row has three fields.

In this function, i made something like this :

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

{

lineas = lines + a<i> + b<i> + c<i> + "\n";

}

result.addValue(lineas);

something wrong?

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

String lines;

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

{

lines.concat(a%i% + b%i% + c%i% + '\n');

}

result.addValue(lines);

replace % with "[" and "]" without "

BTW

do you use <b>Queue</b> when you created user advanced fucntion?

Regards,

michal

Message was edited by: Michal Krawczyk

inigo_sacramento
Participant
0 Kudos

Wow.

I'm not allow to insert the branches for the index of the arguments.

Well, think that they are ok.

lineas = lineas + a(i) + b(i) + c(i) + "\n".

In this algorithm, i only get last row of the payload.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

have a look at my updated code

in the previous answer

Regards,

michal

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

BTW

remember to create advanced user defined function witht queue option and not a simple one or something

Regards,

michal

inigo_sacramento
Participant
0 Kudos

I think there must be something wrong in lines.concat because as result, i don't get anything.

I did as you say but i get an empty string as result.

Regards

moorthy
Active Contributor
0 Kudos

HI,

Just check with DisplaY Queue in the Mapping Editor.. So that you can find where exactly,what is passing..

Second, I am just giving this hint- just try to add each item into a list variable under For loop. and then return the list..

This may be other way..

Regards,

Moorthy

inigo_sacramento
Participant
0 Kudos

Hi.

There was something left ...

lines = lines.concat(a%i% + b%i% + c%i% + '\n');

For the first time ... michal, you missed something

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

Regards,

michal