为什么此PHP电子邮件脚本无法发送到我的Yahoo电子邮件?

时间:2020-10-17 02:11:15

标签: php email smtp yahoo-mail

所以我有这个脚本,我一直在试图弄清为什么它无法发送到我的Yahoo电子邮件帐户。

<?php


require 'Exception.php';
require 'PHPMailer.php';
require 'SMTP.php';

require 'autoload.php';
//PHPMailer Object
$mail = new PHPMailer(true);



$mail->SMTPDebug  = 2; 
$mail->Host       = "tampabaydowns@tbdseats.com"; 
$mail->SMTPAuth = true; 
                    
          
$mail->Username   = "tampabaydowns@tbdseats.com"; 
$mail->Password   = "~~~";  

$mail->SMTPSecure = "SSL";  
$mail->Port       = 465;   

$mail->From = "tampabaydowns@tbdseats.com";
$mail->FromName = "Tampa Bay Downs";

$mail->addAddress("~~@yahoo.com", "Austin");

$mail->Subject = 'PHPMailer GMail SMTP test';
$mail->Body = 'This is a plain text';

try {
    $mail->send();
    echo "Message has been sent successfully";
} catch (Exception $e) {
    echo "Mailer Error: " . $mail->ErrorInfo;
}

?>

当我加载脚本页面时,它说发送成功,但是在服务器上,电子邮件随之弹回

 ~~@yahoo.com
    host mta6.am0.yahoodns.net [67.195.~~]
    SMTP error from remote mail server after pipelined MAIL FROM:<~~~@server.tbdseats.com> SIZE=1759:
    553 5.7.2 [TSS09] All messages from 217.~~ will be permanently deferred; Retrying will NOT succeed. See https://postmaster.verizonmedia.com/error-codes

我不确定为什么这行不通。当我用gmail替换yahoo电子邮件时,它将发送并且gmail从服务器获取电子邮件。雅虎有什么需要做的与众不同的事情吗?

我的Yahoo电子邮件没有阻止任何传入的电子邮件地址,也不在我的垃圾邮件中。

我在安全信息中添加了~~~,这就是为什么存在该信息的原因。

有人可以帮忙吗,过去3个小时我一直在努力解决这个问题:(:(

1 个答案:

答案 0 :(得分:1)

您的提供商的电子邮件服务器的IP地址已被yahoo阻止。使用其他服务器或服务中继您的消息。正如您所指出的,gmail可以正确中继您的邮件。

您还可以要求电子邮件管理员尝试为您修复它,但是Yahoo很难处理此类错误。