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

后端 未结 5 2007
无人及你
无人及你 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:07

    There is a possibility you did not set proper header data, and those emails are blocked even before reaching spam folder.

    Try adding something like this:

    $headers = 'From: your@email.com' . "\r\n" .
    'Reply-To: some@email.com';
    

    This is the fourth parameter of mail() function.

提交回复
热议问题