Page 1 of 1
Any reasons not to use mail function?
Posted: Sun Aug 20, 2006 7:08 pm
by GeXus
Are there any reasons why not to use php's mail function? as far as deliverability goes... how does it stack up to other classes you may find or commercial software?
Posted: Sun Aug 20, 2006 7:16 pm
by jayshields
Well, it's a matter of opinion.
If you're unfamiliar with any specific classes, and you just want to send a simple email, use mail(). If mail() gives you problems, you're probably better off finding a good class (SwiftMailer *cough*) and implementing it rather than trying to solve the problem with mail(), as it's not extensively configurable.
Posted: Sun Aug 20, 2006 8:10 pm
by feyd
The headers alone are a minefield of settings. One misplaced can easily kill your email from reaching certain servers. I would say that if you are unfamiliar with the quirks of the various receiving servers or unfamiliar with the correct headers or need to send anything more than a plain-text email, use a package. There are several free (as in beer) solutions out there that have been tested fairly thoroughly and are often referred to as tools to hold onto. On DevNet,
Swift is probably the most recommended, as one of our own (moderators) made it. Another frequently referenced is
phpMailer.