How does everyone send mail using PHP? I've been using the basic mail() function but it always get sent to the spam folder. I'm looking into PEAR mail, PHPMailer, and SwiftMail. Does anyone else have problems with their site emails getting junked in a spam folder?
I use the mail() function aswell. I find that it is only hotmail and yahoo emails that seem to be going to the junk or spam folders.
I usually don't have a reason to mail things out, but when I do, I use the mail() function. It doesn't ever go to my SPAM box, but I use AIM mail; maybe that has something to do with it.
the only reason is that your server is blacklist for sending spam emails. maybe it's someone else that use the same server as yours. try to find a better hoster like hostgator etc. i try a same mail() on different server, and the result was different.
I ran a test to see if my server was blacklisted, and it wasn't. Resellerzoom and Hostingzoom are pretty decent.
I read a discussion in php.net's mail() page, some members said you must add several mail headers. Sorry i forget what header should be added, but you can use any mailer class instead of simple mail(), usually, the class has already used that header tech. However it seems the recipient's server filters the mail content too.