php – Sendmail问题:已成功发送但从未到达
发布时间:2020-12-13 17:18:52 所属栏目:PHP教程 来源:网络整理
导读:我正在尝试通过 PHP mail()函数发送邮件,据我所知,使用sendmail来发送邮件.现在我的问题是mail()返回true但是我的邮箱中甚至没有邮件的痕迹(是的,我也检查了垃圾邮件). 所以我试图从终端手动发送一些邮件,但问题仍然存在. sendmail没有给我一个错误,除了无法
我正在尝试通过
PHP mail()函数发送邮件,据我所知,使用sendmail来发送邮件.现在我的问题是mail()返回true但是我的邮箱中甚至没有邮件的痕迹(是的,我也检查了垃圾邮件).
所以我试图从终端手动发送一些邮件,但问题仍然存在. sendmail没有给我一个错误,除了无法确定域错误,我通过将我的开发机器的域添加到/ etc / hosts并将其与127.0.0.1相关联来修复. andreas@Andreas-PC-Ubuntu:~$sendmail xxxxxxx@xxxxxxx.com Test . andreas@Andreas-PC-Ubuntu:~$ 除了没有错误,sendmail会在/var/log/mail.log中记录邮件已成功发送: Apr 7 01:16:21 Andreas-PC-Ubuntu sendmail[11759]: q36NGIfD011759: from=andreas,size=5,class=0,nrcpts=1,msgid=<201204062316.q36NGIfD011759@home.hagenz.com>,relay=andreas@localhost Apr 7 01:16:21 Andreas-PC-Ubuntu sm-mta[11760]: q36NGL1J011760: from=<andreas@home.hagenz.com>,size=299,proto=ESMTP,daemon=MTA-v4,relay=ip6-localhost [127.0.0.1] Apr 7 01:16:21 Andreas-PC-Ubuntu sendmail[11759]: q36NGIfD011759: to=xxxxxxx@xxxxxxx.com,ctladdr=andreas (1000/1000),delay=00:00:03,xdelay=00:00:00,mailer=relay,pri=30005,relay=[127.0.0.1] [127.0.0.1],dsn=2.0.0,stat=Sent (q36NGL1J011760 Message accepted for delivery) 那么,有什么建议吗? 解决方法
您确定收件人SMTP服务器没有丢弃(或至少灰名单)您的邮件吗?邮件服务器将非来自识别的MX服务器的邮件视为垃圾邮件非常常见.
sendmail是否配置为使用SMTP中继/ smarthost?如果不是,如果您将其配置为使用您的ISP,雇主或其他托管服务提供商的服务器会发生什么? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |