简体   繁体   English

如果发件人是Yahoo邮件,则Gmail不会收到phpmailer电子邮件

[英]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.

相关问题 phpmailer没有发送电子邮件到gmail,yahoo,hotmail或这些阻止了phpmailer发送的电子邮件 - phpmailer not sending email to gmail,yahoo,hotmail or these are blocking email sent by phpmailer Gmail收到的邮件,但其他提供商PHPMailer没有收到 - Mail received by Gmail but not others provider PHPMailer 使用phpmailer和XAMPP调试PHP邮件到Yahoo电子邮件 - Debugging PHP Mail with phpmailer and XAMPP to Yahoo email 我正在使用 PHPMailer,但在 gmail 中未收到邮件 - I am using PHPMailer but mail not received in gmail PHPMailer Lite和GMAIL SMTP:电子邮件未发送到Yahoo Mail,如何调试? - PHPMailer Lite & GMAIL SMTP: emails not sent to Yahoo Mail, how to debug? phpmailer更改邮件发件人 - phpmailer change mail sender 使用 smtp phpmailer 发送的邮件中显示不正确的发件人电子邮件地址 - Incorrect sender email address shows in the mail send using smtp phpmailer 无法使用codeigniter电子邮件类别和yahoo邮件作为发件人接收邮件 - Unable to receive mails using codeigniter email class and yahoo mail as the sender 使用php mail()函数的电子邮件附件-适用于gmail,但不适用于yahoo - Email Attachments using php mail() function - Working for gmail but not working for yahoo 忘记密码。 无法通过yahoo / gmail或其他邮件获得电子邮件 - Forgot Password. Not getting an email in yahoo/gmail or other mail
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM