phpmailer AUTH不接受服务器

时间:2016-12-23 16:28:53

标签: php email smtp phpmailer

我正在尝试使用phpmailer发送电子邮件,当我发送到gmail但它停止任何其他(hotmail,yahoo ...)时它工作正常,它一直给我(AUTH不接受服务器)smtp调试和(语言字符串无法加载:from_failedorder@toheco.com)$ email->错误信息

这是我的代码:

require_once("./PHPMailer-master/PHPMailerAutoload.php");
 $email = new PHPMailer();
$email->IsSMTP();
$email->Host = "smtp.gmail.com";
$email->SMTPAuth = true;
$email->SMTPSecure = 'tls';
$email-> Port = 465;
//$email->SetLanguage( 'en', './PHPMailer-master/language/' );
$email->Username   = "username";
$email->Password   = "*******";
$email->SMTPDebug  = 2;
$email->From      = 'order@toheco.com';
$email->FromName  = 'order@toheco.com';
$email->Subject   = 'Trans Ocean Heavy Equipment : Cart Order';
$email->Body      = $content;
$email->IsHTML(true);
$email->AddAddress( $WEB_MASTER );
$email->AddAddress( $_POST[Email] );
if ( $email->send() ){

        echo "success";
}
else{
        echo "555 " .$email->ErrorInfo;

}

提前致谢

0 个答案:

没有答案