PHP Classes

Send to multiple email addresses using headers

Recommend this page to a friend!

      Universal PHP Mailer  >  All threads  >  Send to multiple email addresses...  >  (Un) Subscribe thread alerts  
Subject:Send to multiple email addresses...
Summary:Multiple recipients doesn't seem to work
Messages:5
Author:Colin Mackinlay
Date:2017-06-10 14:35:43
 

  1. Send to multiple email addresses...   Reply   Report abuse  
Picture of Colin Mackinlay Colin Mackinlay - 2017-06-10 14:35:43
I can't add multiple recipients using:

$mailor->toEmail = 'user1@somedomain; user2@validdomain';

  2. Re: Send to multiple email addresses...   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-06-10 23:06:24 - In reply to message 1 from Colin Mackinlay
Thanks for your request.

At the moment, only one recipient can be specified. The workaround would be to run the script multiple times and each time define one (new) recipient.

I plan to add this to the mailer in the very near future.

  3. Re: Send to multiple email addresses...   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-06-11 01:21:32 - In reply to message 1 from Colin Mackinlay
Done.

Please download the latest version of the mailer. The To: recipients are specified in an array. Please see the documentation for details.

Let me know if you encounter any problems.

  4. Re: Send to multiple email addresses...   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-06-11 10:53:20 - In reply to message 1 from Colin Mackinlay
Stay tuned.

I am improving the library with additional things, such as Cc: and Bcc:. I will publish it shortly.

Thanks.

  5. Re: Send to multiple email addresses...   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-06-11 22:46:07 - In reply to message 1 from Colin Mackinlay
Just finished and published v3.0.

Now can also set Cc: and Bcc: recipients; made few more improvements.

Things have changed slightly, so you will need to change your code a bit -- how you define sender, recipients (arrays).