how to use SMTP + PHP + MYSQL?

I've got a mass mail function that sends e-mail to all email addresses in my mysql table, but they all get received marked as spam. I want to use smtp validate to fix this. How can I use smtp validation with mail($email, $subject, $message, $headers);?


Usually, when a post is regarded as spam like this it's because you're using the wrong SMTP server. Make sure you use that server that is responsible for the domain of your From address. Also, if you're sending out mail en-masse, it's best to use a module like PEAR::Mail.

The mails being marked as spam could be for a few reasons, if your on shared hosting, then its possible that it may have been blacklisted, quite often though, its to do with the headers in your email, how do your headers look at present? Also, if youre sending html emails, its best to include a text version of the email aswell.

Id recommend using PEAR::Mail, it can also handle SMTP as well as the SMTP authentication.

Need Your Help

Xmlhttp request is raising an Access Denied error

vba xmlhttprequest

The following Excel macro, which is making an xmlhttp request to this webpage to retrieve some values at a second stage, has worked normally in VBA until some time ago: