php mail() 去垃圾邮件,但是当通过 SMTP 服务器发送时它工作正常吗? [英] php mail() Goes to spam but when sent via SMTP Server it works fine?

查看:26
本文介绍了php mail() 去垃圾邮件,但是当通过 SMTP 服务器发送时它工作正常吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在设置我的网络服务器,以便我可以通过 PHP 代码发送电子邮件,我遇到的问题是通过 php mail() 发送的电子邮件总是发送到我的 gmail 垃圾邮件,就像我通过 SMTP 服务器发送电子邮件一样与 Gmail 相同的 VPS 不会发送到垃圾邮件.

他们的任何人都可以提供帮助吗?

更新:

通过 Ryan@Ryanteck.org.uk & 发送Noreply@Mc-Serverlist.co.uk 对于 PHP Mail()(ryan@ryanteck.org.uk 也是如此)

当通过 PHP Mail() 或 Webmin 电子邮件发送到垃圾邮件时

当通过 SMTP 服务器通过 Gmail 发送时,它发送正常

PHP 邮件原始消息:http://pastebin.com/TP2UfDP7(这是 Noreply@Mc-Serverlist.co.uk)p>

Webmin 电子邮件系统:http://pastebin.com/2VWvDd7v

Gmail SMTP:http://pastebin.com/wgewGnmk

解决方案

您的 vps 没有配置 rDNS,HELO 指向不同的 ip.HELO 中的不一致和缺少 rDNS 会触发许多垃圾邮件过滤器.

<块引用>

收到:来自 ryanteck.org.uk ([95.154.250.75])

主机 75.250.154.95.in-addr.arpa.未找到:3(NXDOMAIN)

ryanteck.org.uk 的地址为 95.154.250.165

设置一个 HELO 主机名,其 A-Record 指向您的 VPS,并将 rDNS (PTR) 配置为相同的主机名.

例子:

  • 创建一个新的 A-Record 'vps.ryanteck.org.uk 95.154.250.75'
  • 将 HELO 设置为vps.ryanteck.org.uk"
  • 将 75.250.154.95 的反向 DNS (PTR) 设置为 vps.ryanteck.org.uk

您的发件人域也有一些奇怪的TXT".记录:

dig txt mc-serverlist.co.uk +short95.154.250.165"挖掘 txt ryanteck.org.uk +short95.154.250.165"

您可能希望将这些更改为格式正确的 SPF 记录,例如.

v=spf1 ip4:95.154.250.165 ip4:95.154.250.75 ~all

I am currently setting up my webserver so then i can send emails via PHP Code, the problem i have is that the emails sent via php mail() always send to my gmail spam where as when im sending emails via the SMTP Server the same VPS has on it on Gmail it dont send to spam.

Is their anyone that can help with this?

Updates:

Sending Via Ryan@Ryanteck.org.uk & Noreply@Mc-Serverlist.co.uk For PHP Mail() (Same happens with ryan@ryanteck.org.uk)

When Sent Via PHP Mail() Or Webmin Email It Sends To Spam

When Sent Via SMTP Server Via Gmail it sends ok

PHP Mail Raw Message : http://pastebin.com/TP2UfDP7 (This is the Noreply@Mc-Serverlist.co.uk)

Webmin Email System : http://pastebin.com/2VWvDd7v

Gmail SMTP : http://pastebin.com/wgewGnmk

解决方案

Your vps doesn't have rDNS configured and the HELO points to a different ip. inconsistencies in HELO and missing rDNS trigger many spamfilters.

Received: from ryanteck.org.uk ([95.154.250.75])

Host 75.250.154.95.in-addr.arpa. not found: 3(NXDOMAIN)

ryanteck.org.uk has address 95.154.250.165

Set a HELO Hostname whose A-Record points back to your VPS and configure the rDNS (PTR) to the same hostname.

Example:

  • Create a new A-Record 'vps.ryanteck.org.uk 95.154.250.75'
  • Set the HELO to 'vps.ryanteck.org.uk'
  • Set the reverse DNS (PTR) for 75.250.154.95 to vps.ryanteck.org.uk

Also your senderdomains have somewhat strange "TXT" records:

dig txt mc-serverlist.co.uk +short 
"95.154.250.165"
dig txt ryanteck.org.uk +short
"95.154.250.165"

you may want to change these into correctly formatted SPF records, eg.

v=spf1 ip4:95.154.250.165 ip4:95.154.250.75 ~all

这篇关于php mail() 去垃圾邮件,但是当通过 SMTP 服务器发送时它工作正常吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆