Unable to Send Email to multiple email addresses from INI file

Hello Everybody,

I am using a INI file for send Emails.
Here is the INI file contents
 
[Email]
To=email1@address.com; email2@address.com; email3@address.com
 
I am trying to send Email to multiple recipients from INI file (using %To% value from INI file) but getting below error
Unable to Send Message
Requested action not taken: mailbox name not allowed
 
I tried ";" instead of "," in INI file but the same error got.
 
Is it posible or any idea?????
 
Thanks for your help.
 
Regards,
Jeegs

 

 

Hi Jeegs

The Send Email action will not accept multiple addresses within a single recipient field.

You have two options for getting around this:

1) You could store the email addresses in a text file (each address on a new line) and use the Load From File option on the Recipients tab.

2) Use a script to add a delimited list of email addresses. I have provided an example script that will add a list of recipients which are stored in the variable ‘To’ and are delimited by a ‘;’ character.

[code]if (To != “”){ Action.SendLogMessage(“Clearing recipient list: " + Action.RecipientsList.Count + " recipients cleared.”); Action.RecipientsList.Clear(); Action.SendLogMessage("Adding recipients: " + To); Action.RecipientsList.AddDelimitedList(To, “;”);}[/code]

To use this script:
1) Select the Send Email action.
2) Select the Script Editor pane and click the Before Action tab.
3) Set the script language to Javascript and paste the code above into the code window.

Regards,
Steve

Appreciate your help Steve, That script works good.

Thanks,
Jeegs