我用IIS配置了Windows 2016,以便从php接收邮件()并将它们发送到stmp.sendgrid.net。
为了测试我的配置,我可以告诉我的本地主机和发送电子邮件从那里没有问题。
但是,如果我通过mail() php函数发送电子邮件,SendGrid将接收该请求,但通过以下错误阻止它:
REASON550 5.7.1 [167.89.55.39 11] Our system has detected that this message is not RFC 5322 compliant: Multiple 'From' headers found. To reduce the amount of spam sent to Gmail, this message has been blocked. Please visit https://support.google.com/mail/?p=RfcMessageNonCompliant and review RFC 5322 specifications for more information. h190si13823586ite.62 - gsmtp 因此,错误是因为IIS将电子邮件发送到sendgrid,正因为此,它被标记为垃圾邮件。
是什么导致的?
发布于 2016-11-09 19:18:41
显然,在使用PHP mail()时,而不是在telnet时,您需要一个详细的头。
对于PHP mail(),在mininum:
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From: your@email.com" . "\r\n";https://stackoverflow.com/questions/40513905
复制相似问题