doudun1029 2016-03-23 18:52
浏览 38

phpmailer smtp错误connect()失败了同一个帐户但主机不同

new project was working fine on my host here my host

but not working on this host new host

and it show this

2016-03-23 15:06:11 Connection: opening to smtp.gmail.com:587,timeout=300,options=array ( )
2016-03-23 15:06:11 Connection: opened 2016-03-23 15:06:11 SMTP -> get_lines(): $data is ""
2016-03-23 15:06:11 SMTP -> get_lines(): $str is "220-server.zaaan.com ESMTP Exim 4.86_1 #1 Wed, 23 Mar 2016 15:06:11 +0000 "
2016-03-23 15:06:11 SMTP -> get_lines(): $data is "220-server.zaaan.com ESMTP Exim 4.86_1 #1 Wed, 23 Mar 2016 15:06:11 +0000 "
2016-03-23 15:06:11 SMTP -> get_lines(): $str is "220-We do not authorize the use of this system to transport unsolicited, "
2016-03-23 15:06:11 SMTP -> get_lines(): $data is "220-server.zaaan.com ESMTP Exim 4.86_1 #1 Wed, 23 Mar 2016 15:06:11 +0000 220-We do not authorize the use of this system to transport unsolicited, "
2016-03-23 15:06:11 SMTP -> get_lines(): $str is "220 and/or bulk e-mail. " 2016-03-23 15:06:11 SERVER -> CLIENT: 220-server.zaaan.com ESMTP Exim 4.86_1 #1 Wed, 23 Mar 2016 15:06:11 +0000 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
2016-03-23 15:06:11 CLIENT -> SERVER: EHLO www.mylifeeg.com 2016-03-23 15:06:11 SMTP -> get_lines(): $data is ""
2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] " 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-SIZE 52428800 " 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 "
2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-8BITMIME "
2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-PIPELINING " 
2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING "
2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-AUTH PLAIN LOGIN "    2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-STARTTLS " 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250 HELP " 2016-03-23 15:06:11 SERVER -> CLIENT: 250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP 2016-03-23 15:06:11 CLIENT -> SERVER: STARTTLS 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "" 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "220 TLS go ahead " 2016-03-23 15:06:11 SERVER -> CLIENT: 220 TLS go ahead 2016-03-23 15:06:11 CLIENT -> SERVER: EHLO www.mylifeeg.com 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "" 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] " 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-SIZE 52428800 " 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-8BITMIME " 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-PIPELINING " 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250-AUTH PLAIN LOGIN " 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN " 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "250 HELP " 2016-03-23 15:06:11 SERVER -> CLIENT: 250-server.zaaan.com Hello www.mylifeeg.com [198.20.126.236] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP 2016-03-23 15:06:11 Auth method requested: UNKNOWN 2016-03-23 15:06:11 Auth methods available on the server: PLAIN,LOGIN 2016-03-23 15:06:11 Auth method selected: LOGIN 2016-03-23 15:06:11 CLIENT -> SERVER: AUTH LOGIN 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "" 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6 " 2016-03-23 15:06:11 SERVER -> CLIENT: 334 VXNlcm5hbWU6 2016-03-23 15:06:11 CLIENT -> SERVER: bW9tYWl6Lm5ldEBnbWFpbC5jb20= 2016-03-23 15:06:11 SMTP -> get_lines(): $data is "" 2016-03-23 15:06:11 SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6 " 2016-03-23 15:06:11 SERVER -> CLIENT: 334 UGFzc3dvcmQ6 2016-03-23 15:06:11 CLIENT -> SERVER: MDEwMjc5ODc5MzI= 2016-03-23 15:06:13 SMTP -> get_lines(): $data is ""

2016-03-23 15:06:13 SMTP -> get_lines(): $str is "535 Incorrect authentication data "
2016-03-23 15:06:13 SERVER -> CLIENT: 535 Incorrect authentication data 2016-03-23 15:06:13 SMTP ERROR: Password command failed: 535 Incorrect authentication data 2016-03-23 15:06:13 SMTP Error: Could not authenticate. 2016-03-23 15:06:13 CLIENT -> SERVER: QUIT
2016-03-23 15:06:13 SMTP -> get_lines(): $data is ""
2016-03-23 15:06:13 SMTP -> get_lines(): $str is "221 server.zaaan.com closing connection "
2016-03-23 15:06:13 SERVER -> CLIENT: 221 server.zaaan.com closing connection
2016-03-23 15:06:13 Connection: closed
2016-03-23 15:06:13 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Mail Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

and my function is

function send_email($emails = array() , $title = '', $msg = '')
{
require_once (__DIR__ . '/mail/PHPMailerAutoload.php');

$mail = new PHPMailer;
$mail->SMTPDebug = 4;
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->Username = 'momaiz.net@gmail.com' ;
$mail->Password = 'my password';
$mail->SMTPSecure = 'tls' ;
$mail->Port = 587 ;
$mail->SMTPAuth = true;
$mail->CharSet = 'UTF-8';
$mail->setFrom( 'safy.php@gmail.com' , 'Hyate Marriage' );
if (is_array($emails))
    {
    foreach($emails as $e)
        {
        $mail->addAddress($e, $e);
        }
    }
  else
    {
    $mail->addAddress($emails, $emails);
    }

$mail->isHTML(true);
$mail->Subject = $title;
$mail->Body = $msg;
$mail->AltBody = $msg;
if (!$mail->send())
    {
    echo 'Mail Error: ' . $mail->ErrorInfo;
    return false;
    }
  else
    {
    return true;
    }
}

the server support say every thing is ok ,

but i'm not able to configure the problem

i allowed gmail low level access

not used google 2 steps verfication

openssl is enabled on new server

the new server has disabled functions. you can check => new website url ?info=01069374995

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!
    • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?