Need to add the list of email in To for sending mail

0
I have a requirement to change the object by appending the list.   I am retriving the list of employees and trying to get their emailid. I have to send a mail where in 'to' I need to send the all emails retreive in previous step. How do I achieve it. I have attached the screenshot of things i have done but I am getting only 1 email id.  
asked
2 answers
1

Set it to 

$New_EmailMessage/To +','+$IteratorEmployee/Email

and behind the loop you will need to remove the last comma-character from the string. You can do so by changing $New_EmailMessage/To like this:

substring($New_EmailMessage/To, 0, length($New_EmailMessage/To) - 1)

 

answered
1

Besides the correct answer from Tim van Steenbergen above, please consider not committing the New_EmailMessage object in a loop (or any object  as general rule).

answered