PHPmailer sending bulk to a user base - should I use BCC or individual emails?

亡梦爱人 提交于 2019-12-11 06:55:11

问题


I have a user database with a few hundred users who need to receive a weekly update email, sent via a weekly scheduled task.

When using PHPmailer, would it be better to send one email with all users in the BCC field, or multiple emails using the standard AddAddress field?

Which is easier on the server and/or is one way more efficient than the other?


回答1:


Individual emails. BCC is easier on the server, but gives you very little control, and there's more scope for sending the wrong thing to many people.

From a server config point of view, SMTP to localhost is the fastest (and safest) way of submitting messages.

To send individual messages efficiently, see the mailing list example provided with PHPMailer, and read the wiki article on sending to lists. The most important things are reusing the PHPMailer instance for multiple messages, clearing recipients in a loop, and using keepalive.



来源:https://stackoverflow.com/questions/50720392/phpmailer-sending-bulk-to-a-user-base-should-i-use-bcc-or-individual-emails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!