SMTP Uses Wrong Server
| Project: | SMTP Authentication Support |
| Version: | 6.x-1.0-beta3 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I have Drupal 6.13 installed on a Windows 2008 Server with IIS 7 and I am having a problem sending email using SMTP. I'm using the latest version of the SMTP module and version 5.0.2 of PHPMailer. I have tried sending a test message using several different email accounts with the same apparent problem (according to the logs). The accounts I'm trying to send through are verified to be working, and one of them is set up and working in Thunderbird right now. The mail server does not require SSL/TLS and it's not being set up that way in SMTP, either. I have also verified that the "from" address on the SMTP configuration matches the email address from Site Information.
The problem seems to be that no matter what I put in the host field, it uses the localhost's domain (www.wrongserver.com). So if I try to put smtp.gmail.com, it still uses www.wrongserver.com or mail.wrongserver.com. It's quite strange. Has anyone else encountered this problem or have any ideas how to fix it?
Here is the log (I have replaced the domain and IP):
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "220 mail.wrongserver.com ESMTP ready. "
SMTP -> get_lines(): $data is "220 mail.wrongserver.com ESMTP ready. "
SMTP -> FROM SERVER:220 mail.wrongserver.com ESMTP ready.
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] "
SMTP -> get_lines(): $data is "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] "
SMTP -> get_lines(): $data was "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] "
SMTP -> get_lines(): $str is "250-SIZE 52428800 "
SMTP -> get_lines(): $data is "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 "
SMTP -> get_lines(): $data was "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 "
SMTP -> get_lines(): $str is "250-PIPELINING "
SMTP -> get_lines(): $data is "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 250-PIPELINING "
SMTP -> get_lines(): $data was "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 250-PIPELINING "
SMTP -> get_lines(): $str is "250-AUTH PLAIN LOGIN "
SMTP -> get_lines(): $data is "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN "
SMTP -> get_lines(): $data was "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN "
SMTP -> get_lines(): $str is "250-STARTTLS "
SMTP -> get_lines(): $data is "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS "
SMTP -> get_lines(): $data was "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS "
SMTP -> get_lines(): $str is "250 HELP "
SMTP -> get_lines(): $data is "250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP "
SMTP -> FROM SERVER: 250-mail.wrongserver.com Hello www.wrongserver.com [1.1.1.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "334 VXNlcm5hbWE4 "
SMTP -> get_lines(): $data is "334 VXNlcm5hbWE4 "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "334 UGFzc3dvcm56 "
SMTP -> get_lines(): $data is "334 UGFzc3dvcm56 "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "535 Incorrect authentication data "
SMTP -> get_lines(): $data is "535 Incorrect authentication data "
SMTP -> ERROR: Password not accepted from server: 535 Incorrect authentication data
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 Reset OK "
SMTP -> get_lines(): $data is "250 Reset OK "
SMTP -> FROM SERVER:250 Reset OK
SMTP Error: Could not authenticate.
It may also help to mention that I have this same problem with the PHPMailer module.

#1
I'm having the same errors. It works from my mail accounts with same settings, but I'm wondering why username and password appear to be encrypted when I am sending it plain text?
PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6 " SMTP -> get_lines(): $data is "334 VXNlcm5hbWU6 " SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6 " SMTP -> get_lines(): $data is "334 UGFzc3dvcmQ6 " SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "535 Incorrect authentication data " SMTP -> get_lines(): $data is "535 Incorrect authentication data " SMTP -> ERROR: Password not accepted from server: 535 Incorrect authentication data SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 Reset OK " SMTP -> get_lines(): $data is "250 Reset OK " SMTP -> FROM SERVER: 250 Reset OK
Same errors with SMTP or phpmailer modules.
Followup:
if i configure phpmailer to use my gmail account with ssl, it works.