PHP Mail Function: Legitimate Mails Marked as Spam by Gmail and Hotmail

Mail sent by mail function marked as spam

There are too many variables to fully eliminate this. The problem that you face is that today's email filters are very efficient at their job. One of the shortcomings of course is that sometimes they filter out email which is not spam. That having been said, it's quite subjective - you might think that the email your site is sending out to someone is critical, but I might not. I'd probably consider it spam, depending upon its contents.

It depends upon the content of your email (text vs HTML, sensitive words like "unsubscribe"), the server upon which the site is hosted, and the destination of the mail. Unfortunately, there's little you can do in terms of guaranteeing delivery to their inbox (rather than spam folder), which is why most sites add a caveat these days, warning users to check their spam folders.

Issue delivering email to hotmail inbox?

There is not much you can do from your PHP code. However your code seems to be ok.

Double check your SPF records in DNS. You can read more about SPF records here.

Also consider using Domain Keys



Related Topics



Leave a reply



Submit