PHP mail not showing up at Gmail but shows up at Hotmail and other 3rd party/ISP account

后端 未结 5 1984
无人及你
无人及你 2020-12-11 16:44

I have 2 sites where mail is sent to two vanity gmail accounts. I\'m using PHP to handle the mail, but the mail is not showing up at gmail (not in spam/junk, it just doesn\

5条回答
  •  再見小時候
    2020-12-11 17:06

    I have encountered problems in the past where certain free email providers would not receive any email from my servers.

    I found that a few things can be the culprit, on top of putting the correct headers in the actual message:

    • Make sure your server is configured for reverse dns lookup
    • Make sure you are not running an open smtp relay
    • Make sure your server did not wind up in any email blacklists (if you had an open relay, you probably got blacklisted.

    Chances are, PHP is sending the email just fine, but the Google servers are rejecting any messages coming from your server.

    You can test this by doing a quick:

    mail -s Test you@gmail.com < /dev/null
    

    If your server is okay, you will receive a message in your gmail, if you don't, PHP isn't the problem.

提交回复
热议问题