问题
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