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

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

问题描述

我正在设置我的网络服务器,所以我可以通过PHP代码发送电子邮件,我的问题是,通过php mail()发送的电子邮件总是发送到我的邮件垃圾邮件,当通过SMTP服务器发送电子邮件相同的VPS在Gmail上它不会发送到垃圾邮件。



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



更新:



发送Ryan@Ryanteck.org.uk& Noreply@Mc-Serverlist.co.uk对于PHP Mail()(与ryan@ryanteck.org.uk相同)



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



通过SMTP发送通过SMTP服务器通过Gmail发送确定



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



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记录指向您的VPS,并将rDNS(PTR)配置为相同的主机名。



示例:




  • 创建一个新的A-Record'vps.ryanteck。

  • 将HELO设置为'vps.ryanteck.org.uk'

  • 设置反向DNS(PTR)为75.250.154.95到vps.ryanteck.org.uk



另外你的发件人域名有一些奇怪的TXT记录:

  dig txt mc-serverlist.co.uk + short 
95.154.250.165
dig txt ryanteck.org.uk + short
95.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天全站免登陆