Sending mail with PHP is a pretty simple process - well, sending simple mail is. What happens when you want to get a bit more complicated with things, like sending attachments or differenly encoded content inside your emails? There are many ways to integrate these kinds of things into your system, but this new post from the Zend Developer Zone suggests a few of the easiest.
Everybody needs to send mail from their application at one point or another. It's like using a database or a sledge-hammer, sooner or later, you are going to want to do it. But what's the best tool? Yesterday I got an email from a friend of mine asking me this question. Since I respect him and his team and they didn't know the answer, I figure there might be others out there who struggle with this. (It will come as no surprise to those of you who read this site regularly that this is not a comprehensive list but more of a primer to get you going. Comprehensive lists are just too hard.)
The software packages/functions that he mentions are:
- PHP's own mail function
- PEAR_Mail
- Zend_Mail from their Framework
- PHPMailer