PHP SwiftMailer or PEAR Mail

爷,独闯天下 提交于 2019-12-23 23:17:29

问题


Does someone have some comments about those two? in terms of experience, performance, easiness, problems, spam related, etc.

Say you need to send emails (10-20) every 1 hour (cron job).


回答1:


I'd go with SwiftMailer. I've used both and Swiftmailer has imho the best API and support. Also SwiftMailer maintenance has been adopted by Fabien Potencier of Symfony fame which only means that it'll improve over time. Pear Mail is also under developement but not really active.

In terms of functionality both are comparable though so it all comes down to API preference.




回答2:


If you are going to move to PHP 5.3 then I would suggest ditching PEAR Mail. I have also been a user of PEAR mail and other packages for long but now I am losing patience with the way PEAR packages just break with new PHP releases. To me it happened with PEAR Mail and HTML_Template_Flexy when I upgraded to 5.3.x. My scripts just stopped working!

These breakages may be genuine and trivial to fix but what scares me is a lack of ownership around these issues and shuttling of blame between PHP and PEAR camp. PEAR has too much PHP4 baggage to carry and it maybe better to look @ new PHP5 alternatives.

And let's face it - Do you want to wake up one day and just wonder why the heck the cron job is not sending mails when you touched nothing?

@see also https://bugs.php.net/bug.php?id=40244

@see also http://pear.php.net/bugs/bug.php?id=9950




回答3:


PEAR Mail is very easy to get up and running, and offers a lot of flexibility. With only 10-20 emails per hour, I don't think performance should be a consideration.



来源:https://stackoverflow.com/questions/5293866/php-swiftmailer-or-pear-mail

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