Multiple Email recipients in To, CC & BCC fields
Application Type
Traditional Web
Service Studio Version
11.14.16 (Build 60354)

I'm having trouble working out how to key multiple email recipients. 

The email addresses are retrieved and stored as input parameters and some as local variables. 

I want to be able to use a combination of these within the 3 available recipient fields (To, CC & BCC)

I've read that emails can be separated by using "," however I only ever seem to get an email for the first address in the expression. In the example below, I will only ever get the email addressed to the address assigned to 'EmailAddress1'

Any help is greatly appreciated. 

My expression within the 'To' field is as below - 

EmailAddress1 + "," EmailAddress2 + "," EmailAddress3

I thought I'd make another post just to confirm I now have this working. 

 I assigned the variable addresses to their own variable and referenced the new 'combined variable' within the recipient field and this worked. 

@Nitish Kumar  You deserve credit for showing a combined variable as this aided the solution. So thank you :)

Hello crig,

Your logic is work because the comma separate only check first instant not all
In your case

E1 +"," E2+","E3

like this

so for next instant you need to write same logic with new substring

E2+","E3

maybe you got this . if yes, this will helps you

Thanks and Regards,

Akshay Deshpande

Hello Craig, 

The only issue with your string is that you are missing a few + signs.

Try something like :
 

EmailAddress1 + "," + EmailAddress2 + "," + EmailAddress3

Hope it helps! 

Paulo Rosário

Hi Paulo, 


I've tried your suggestion however in my 'test inbox' the 'To' field still only shows the first recipient email address from the string within O/S. In this case - EmailAddress1

Hi Craig Merrick,

I have also assigned multiple mail IDs to mail's TO Variable in the below-given formate and it seems working fine.

For your reference sending you some screenshots.

Email1+","+Email2+","+Email3

I hope it will fix your issue.

Thanks & Regards

Nitish Kumar

Hi Nitish, 


 Is assigning the individual variable email addresses to a combined variable required or can I reference each individual variable email address within the 'To' field as per below?

There is a feature toggle to determine which address variable to use. Either both email1 & email2 (which is populated via a site property) or just email1.

The feature toggle is turned on so the only logical outcome should be both Email 1 & 2 getting the email which is not happening.


Hi Craig Merrick,

In your case seems like this IsFeatureToggleOn is not working as you expect. To fix I suggest copying your above written IF condition from TO to some local variable within the action before mail and then trying to print the value of that variable on any screen or try to debug the action to find out what value this whole if expression is returning to you.

Hope this will fix your issue.

Thanks & Regards

Nitish Kumar

Hi @Nitish Kumar 

I have tried debugging and IsFeatureToggleOn is validating to 'IsOn' so I don't think the issue is with the feature toggle.

I thought I'd make another post just to confirm I now have this working. 

 I assigned the variable addresses to their own variable and referenced the new 'combined variable' within the recipient field and this worked. 

@Nitish Kumar  You deserve credit for showing a combined variable as this aided the solution. So thank you :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.