[ACCEPTED]-PhpMailer vs. SwiftMailer?-swiftmailer
I was going to say that PHPMailer is no 15 longer developed, and Swift Mailer is. But 14 when I googled ...
That suggests its being 13 worked on again.
I've used PHPMailer a lot, and 12 its always been solid and reliable. I had 11 recently started using Swift Mailer, for 10 the above reason, and it too has given me 9 no trouble.
Now that PHPMailer is developed 8 again, I think I'll probably give the new 7 version a try.
So, my answer is that both 6 are capable, and that it doesn't matter 5 that much – choose one, learn it, use it. Both 4 offer massive advantages over mail() and 3 abstract away the nuances of email so that 2 you can get on with whatever you are really 1 trying to develop.
Whatever the features are, they have variety 2 in their applicable licenses:
PHPMailer - LGPL 1 2.1 (https://github.com/PHPMailer/PHPMailer)
SwiftMailer - MIT license (https://github.com/swiftmailer/swiftmailer)
There is also Zend_Mail. If I had to pick one for 2 a new project today, I would seriously consider 1 that.
Having looked at both I think SwiftMailer 6 has a much nicer interface than PHPMailer 5 and as someone has pointed out Zend_Mail 4 is also another good option especially if 3 you're using other Zend components. It 2 makes life much easier if you use everything 1 from the same framework.
I've used PHPMailer on many projects and 6 never had a problem. It's feature complete 5 and it has good docs.
I had never heard of 4 Swiftmailer so I took a peek at the website. It 3 seems a nice solution too.
If your needs 2 are simple as you say, then just pick one 1 at random.
Google trends: swiftmailer is growing but phpmailer is still very strong.
I would go with Swiftmailer because documentation 15 is clear and easy. Phpmailer site/docs are 14 a bit messy (at least they look so).
EDIT: after 13 trying them both (and banging my head against 12 an hosting issue for which SwiftMailer did 11 not output any type of hint) I completely 10 changed my mind, I would definitely go with PHPMailer for at least one good 9 reason: it's much easier to debug in the 8 event you have any issue.
Both SwiftMailer 7 and PHPMailer provide debug options (SwiftMailer 6 with a plugin and PHPMailer by turning on 5
SMTPDebug = 2), but SwiftMailer is made by hundreds of 4 small files that make SwiftMailer more difficult 3 to debug compared to the 3 files PHPMailer 2 is made of.
And about docs, the PHPmailer documentation is less 1 fancy looking, but it has got all you need: simple tutorial, examples
I've just switched to Swift today due to 4 the problems with PHPMailer and PHP 5.3 3 - even the latest version - which is a shame. Swift 2 has a very well documented integration, which 1 makes things easier.
More Related questions