Php – Gmail flagging emails as spam despite SPF being enabled and working perfectly

emailgmailPHPspf

I have a website where people can recommend contents to their friends using their email. The issue is that emails are being flagged as spam whereas if I do the same from my development machine things are working out fine. I have enabled SPF and it is perfect.

When sending through website, the email appears as this in Gmail Inbox: From xyz@gmail.com to abc@gmail.com.

When I send it from my development machine it appears as : From xyz.com via mywebsite.com to abc@gmail.com mailed by mywebsite.com and this is exactly how I envisioned it.

From what little I could figure out by looking at the source of emails in Gmail is that when sending from my development machine Gmail correctly recognizes my domain as mywebsite.com for which SPF is enabled and hence it treats it as genuine email. Whereas Gmail recognizes my domain as mywebsite@ln5.securedhostdns.com when sent through the website. Can someone tell me why it does so?

Any help would be really appreciated.

Best Answer

Google's antispam takes into account many more variables than just SPF records. You need to check with them to understand why your mail is being blocked. Start by reading their guidelines for bulk senders:

https://mail.google.com/support/bin/answer.py?hl=en&answer=81126

Then if you are still unsure contact their postmaster.

Make sure your domain has feedback loops setup with all the major destination mail providers as well, so you'll be notified of issues.

Related Topic