[英]phpmailer email not received by gmail if sender is yahoo mail
I'm trying to figure out why Gmail doesn't receive emails if the $mail->From =""
is set with a yahoo account. 我试图弄清楚为什么$mail->From =""
设置了Yahoo帐户后,Gmail无法收到电子邮件的原因。
$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->From = "$email";
$mail->FromName = $name;
$mail->AddAddress($admin_email);
Above is a part of my code. 以上是我的代码的一部分。
It's not really supposed to work. 它不是真的应该工作。
Among other things, GMail likely checks the Sender Policy Framework (SPF) for the sender domain to see whether your mail server is allowed to send from that domain. 除其他外,GMail可能会检查发件人域的发件人策略框架(SPF),以查看是否允许您的邮件服务器从该域发送邮件。 It's unlikely that Yahoo allows this kind of address spoofing from any server, therefore you fail the basic SPF check. Yahoo不太可能允许任何服务器进行这种地址欺骗,因此您无法通过基本SPF检查。
What I would do in your situation is set a static mail from address, but a dynamic reply-to address. 在您遇到的情况下,我将设置一个静态的发件人地址,但设置一个动态的回复地址。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.