I get the following error log when trying to send a message through an Exchange server:
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "220 mail.borschow.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 7 Apr 2009 21:56:53 -0400 "
SMTP -> get_lines(): $data is "220 mail.borschow.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 7 Apr 2009 21:56:53 -0400 "
SMTP -> FROM SERVER: 220 mail.borschow.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 7 Apr 2009 21:56:53 -0400
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250-mail.borschow.com Hello [10.0.254.231] "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] "
SMTP -> get_lines(): $str is "250-TURN "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN "
SMTP -> get_lines(): $str is "250-SIZE "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE "
SMTP -> get_lines(): $str is "250-ETRN "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN "
SMTP -> get_lines(): $str is "250-PIPELINING "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING "
SMTP -> get_lines(): $str is "250-DSN "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN "
SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES "
SMTP -> get_lines(): $str is "250-8bitmime "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime "
SMTP -> get_lines(): $str is "250-BINARYMIME "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME "
SMTP -> get_lines(): $str is "250-CHUNKING "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING "
SMTP -> get_lines(): $str is "250-VRFY "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY "
SMTP -> get_lines(): $str is "250-X-LINK2STATE "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE "
SMTP -> get_lines(): $str is "250-XEXCH50 "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE 250-XEXCH50 "
SMTP -> get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE 250-XEXCH50 "
SMTP -> get_lines(): $str is "250 OK "
SMTP -> get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE 250-XEXCH50 250 OK "
SMTP -> FROM SERVER: 250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE 250-XEXCH50 250 OK
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "504 5.7.4 Unrecognized authentication type. "
SMTP -> get_lines(): $data is "504 5.7.4 Unrecognized authentication type. "
SMTP -> ERROR: AUTH not accepted from server: 504 5.7.4 Unrecognized authentication type.
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 2.0.0 Resetting "
SMTP -> get_lines(): $data is "250 2.0.0 Resetting "
SMTP -> FROM SERVER: 250 2.0.0 Resetting
ok, I found my problem.
I am using an SMTP server that permits sending messages without authentication. Therefore I removed the login and password from my code. But I forgot to set the "uses authentication" flag to false. Now it's working.
Thanks for the Help!
SMTP -> get_lines(): $str is "504 5.7.4 Unrecognized authentication type. "
SMTP -> get_lines(): $data is "504 5.7.4 Unrecognized authentication type. "
SMTP -> ERROR: AUTH not accepted from server: 504 5.7.4 Unrecognized authentication type.
What authentication are you using. I think thats causing the issue. Post the code here so that we can help more.
remember that Gmail needs SSL for connecting and also they don't use the standard SMTP port. If you are using an old version of phpMailer you need to make a kind of hack to put it working.
Try adding this:
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
TLS is needed for many SMTP servers these days.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.