This topic is locked
[SOLVED]

 send email to multiple addresses in same field

11/20/2018 2:25:58 AM
PHPRunner General questions
S
shoppy author

I tried to find this question on the forum but couldn't find it.
I have an emailfield in the customers page.

There is no problem in sending the email to one address in that field but sometimes a customer has more then one emailaddress.

How do I get more addresses in that emailfield?

I tried a comma, a dot .... but nothing works.

A
Andrew S 11/20/2018

I have a similar setup which works.
Customers can have single, multiple or no email addresses. Make sure they are separated by a comma in the database table field holding the addresses where multiple addresses are stored.
After record updated event, I lookup the field and store the contents as follows
$_SESSION["tmpUpdateEmail"] = DBLookup("select UpdateEmail from Companies where CompanyID=".$values['companyid']);
after other bits of code defining email content etc. I use
$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, "attachments" => $attachments));
Works fine for me.

S
shoppy author 11/20/2018

Great, thanks.
I also got the advice to use the comma but also a space between them like: me@dot.com , me2@dot.com.

This works as well.