Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Sending mass mails: One for each or one for all?

When sending mass mails with PHP, is it better to send each subscriber an e-mail (running a for loop through all the e-mail addresses) or is it better to just add all in BCC in a comma separated list and thus sending only one e-mail?

Thank you.

like image 721
Francisc Avatar asked Feb 14 '11 15:02

Francisc


1 Answers

There's a good chance the number of addresses in the BCC field is limited on the SMTP server (to avoid spamming). I'd go with the safe route and send an e-mail to each individual subscriber. That will also allow you to customize the e-mail for each subscriber if needed.

Also note that mail() is probably not the best way to send bulk mail (due to the fact that it opens a new connection to the SMTP server each time it's invoked). You may want to look into PEAR::Mail.

like image 84
Victor Welling Avatar answered Sep 22 '22 02:09

Victor Welling