PHP 邮件未显示在 Gmail 中,但显示在 Hotmail 和其他第 3 方/ISP 帐户中
我有 2 个站点,其中邮件被发送到两个虚荣 gmail 帐户.我正在使用 PHP 来处理邮件,但邮件没有显示在 gmail 中(不是垃圾邮件/垃圾邮件,只是没有显示).如果我切换 PHP 以发送到我的个人 hotmail 帐户,邮件就会显示出来.通过我的 ISP 的个人电子邮件帐户也是如此.
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't show up). If I switch the PHP to send to my personal hotmail account, the mail shows up. Same for a personal email account through my ISP.
邮件曾经出现在这 2 个虚荣的 gmail 帐户中,知道为什么他们会停止吗?
The mail used to show up at those 2 vanity gmail accounts, any ideas why they would just stop?
推荐答案
可能是您没有设置正确的标头数据,并且这些电子邮件甚至在到达垃圾邮件文件夹之前就被阻止了.
There is a possibility you did not set proper header data, and those emails are blocked even before reaching spam folder.
尝试添加如下内容:
$headers = 'From: your@email.com' . "
" .
'Reply-To: some@email.com';
这是mail()函数的第四个参数.
This is the fourth parameter of mail() function.
相关文章