On the ever-popular site MetaFilter.com, there's this new post in their "Ask MetaFilter" section from someone looking for a secure PHP-based email script.
I need a PHP-based email script that will take the name, email, subject, and message form fields I pass to it and send them to me with the name and email used as the "From" field in the message header. I also need to put a value in the header that identifies the sender's IP address. And, of course, I need a script that is not vulnerable to header injection spam attacks. Any recommendations?
So far, the comments have ranged anywhere from "just use mail()" to PHPMailer. What do you think? Have an opinion on what would make for a good secure mailer for a PHP application?