Better way to send bulk mail using PHP without PEAR Mail and 'mail' function

╄→尐↘猪︶ㄣ 提交于 2019-12-13 12:51:52

问题


What script, class or function you use to send many emails, excluding the in-built 'mail' function and excluding the PEAR Mail (many problems and compatibility issues in PHP 5.3).

I want to send about 5000 emails per 'shot', but 'mail' function connect and disconnect for each email. PEAR Mail have many problems.

I've tried Swiftmailer, but the HTML appears duplicated in many clients (because apparently it is attached).

Is PHPMailer the answer?

PS: Sorry for the typos. I'm Brazilian.


回答1:


Before implementing our own system we used PHPMailer with the isSMTP() option and saw throughput of about 20 emails / sec (build time + send). If you have static content your throughput should be a bit higher.

There is an option to use a persistent SMTP connection.




回答2:


PHPMailer will do what you want, though if you use it as a page load, be mindful of your page execution time limits. If you go over you want to be able to pick up where you left off. This presumes each mail is being customized per each user.

Based on that experience, I stopped using web-browser loading of such PHP scripts, and instead now do them on the command line.



来源:https://stackoverflow.com/questions/2320978/better-way-to-send-bulk-mail-using-php-without-pear-mail-and-mail-function

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