swift mailer从yahoo发送电子邮件到gmail错误

时间:2016-07-26 21:12:42

标签: php email swiftmailer

    $transport = Swift_SmtpTransport::newInstance();
    $mailer = Swift_Mailer::newInstance($transport);
    $message = Swift_Message::newInstance();
    $message->setSubject("Meal Cancellation");
    $message->setBody($email_content, 'text/html');
    $message->setFrom(array("testing@yahoo.com" => "testing"));
    $message->setTo("testing@gmail.com");
    $result = $mailer->send($message);
    if($result){
        echo "1";
    }

收到雅虎邮箱说:
此消息是由邮件传递软件自动创建的。

您发送的邮件无法发送给其中一个或多个邮件 收件人。这是一个永久性错误。以下地址失败:

testing@gmail.com
    主持人gm​​ail-smtp-in.l.google.com [74.125.68.26]
    数据结束后来自远程邮件服务器的SMTP错误:
    550-5.7.1由于域名的原因,不接受来自yahoo.com的未经身份验证的电子邮件     550-5.7.1 DMARC政策。如果,请联系yahoo.com域管理员     550-5.7.1这是一封合法的邮件。请拜访     550-5.7.1 https://support.google.com/mail/answer/2451690了解DMARC     550 5.7.1倡议。 gn4si2239130pac.239 - gsmtp

我可以知道问题是什么以及如何解决问题

0 个答案:

没有答案