PHP mail not showing up at Gmail but shows up at Hotmail and other 3rd party/ISP account(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.
这篇关于PHP 邮件未显示在 Gmail 中,但显示在 Hotmail 和其他第 3 方/ISP 帐户中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHP 邮件未显示在 Gmail 中,但显示在 Hotmail 和其他第 3 方/ISP 帐户中


基础教程推荐
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 如何替换eregi() 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01