Send email to multiple Recipients outolook 365 activity with variable

Hi I’m trying to send an email to multiple recipients within the Outlook 365 send mail activity. In the documentation it is stated that if you want to send an email to multiple recipients, use a comma seperator, e.g.: {test1@email.com,test2@email.com}. This works. However, how do I do this using a variable?

For instance, if I have a variable that has multiple emails for example Var1 contains: “test1@email.com,test2@email.com”, how do I use this variable to send the email? Because putting this variable in the “to” doesn’t work. Even if I change it to: “”“test1@email.com”""+","+"""test2@email.com"""

1 Like

Hey @Yagsinats,

You need to use a string array variable instead of normal string variable.

Else, use var1.Split(","c) in to field.

Hope this helps.

Thanks :slight_smile: