简体   繁体   中英

PHP SwiftMailer or PEAR Mail

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).

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM