I am trying to install this module to setup emails for registration and other actions/triggers. On my modules list I enabled it but there are no options under admin -> site configuration. I am using Drupal6, PHP 5, and Apache 2 and getting this error.


# warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal6\includes\mail.inc on line 193.
# Unable to send e-mail. Please contact the site admin, if the problem persists.
# warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal6\includes\mail.inc on line 193.
# Unable to send e-mail. Please contact the site admin, if the problem persists.
# warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal6\includes\mail.inc on line 193.

Can somebody please walk me through setting up php.ini and whatever else I need to do to fix this?

Comments

oadaeh’s picture

If you don't have Administer -> Site configuration -> SMTP Authentication Support (admin/settings/smtp), then there's something wrong with your installation. First triple check that path (try it both by clicking on the links and by typing in the address), and if it's still not there, then try deleting the module and reinstalling it. Also, make sure you don't have more than one copy of it in your Drupal installation.

For configuring your php.ini, look for the '[mail function]' string (w/o the quotes) and change the 'SMTP' value to that of your SMTP server (mail.example.com, or whatever it is). You can leave 'smtp_port' alone, unless the SMTP server operates on a different port than the default 25, and you can leave 'sendmail_from' alone, unless you want to hard-code that value there.

I actually don't think you need to change anything in the php.ini file, if you are using smtp.module. However, I have not setup a Windows server w/PHP mail before, so I don't know for sure.

bmeier’s picture

Status: Active » Fixed

So I took your suggestion and tried going to the path '/admin/settings/smtp' but I was told that I was not authorized to view the page (I'm Admin and only account). My only wild guess was that it had to do with the Private Upload module I recently installed. I disabled that and was able to see and use SMTP correctly. Thanks, now time to install SSL....

bmeier’s picture

Status: Fixed » Active

I fixed the problem above and entered my server info into SMTP and my corresponding email into 'site information' but then got this massive error report (it printed without newlines like this sorry). I don't really know where to start fixing this one, also is there a way to check if I have SSL installed? That may be a problem as well. I tried using gmails smtp server as a control but was unsuccessful there as well. The connection timed out when trying to send an email (does my port 465 have to be open because its not).
Any help would be appreciated I'm still learning Drupal.

SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "220 enews.nrl.navy.mil Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at Thu, 24 Jul 2008 12:25:08 -0400 " SMTP -> get_lines(): $data is "220 enews.nrl.navy.mil Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at Thu, 24 Jul 2008 12:25:08 -0400 " SMTP -> FROM SERVER: 220 enews.nrl.navy.mil Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at Thu, 24 Jul 2008 12:25:08 -0400 SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250-enews.nrl.navy.mil Hello [10.1.0.226] " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] " SMTP -> get_lines(): $str is "250-TURN " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN " SMTP -> get_lines(): $str is "250-SIZE " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE " SMTP -> get_lines(): $str is "250-ETRN " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN " SMTP -> get_lines(): $str is "250-PIPELINING " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING " SMTP -> get_lines(): $str is "250-DSN " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN " SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 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-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 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-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 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-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 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-enews.nrl.navy.mil Hello [10.1.0.226] 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-enews.nrl.navy.mil Hello [10.1.0.226] 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-EXPS GSSAPI NTLM " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM " SMTP -> get_lines(): $str is "250-AUTH GSSAPI NTLM " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM " SMTP -> get_lines(): $str is "250-X-LINK2STATE " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM 250-X-LINK2STATE " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM 250-X-LINK2STATE " SMTP -> get_lines(): $str is "250-XEXCH50 " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM 250-X-LINK2STATE 250-XEXCH50 " SMTP -> get_lines(): $data was "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM 250-X-LINK2STATE 250-XEXCH50 " SMTP -> get_lines(): $str is "250 OK " SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM 250-X-LINK2STATE 250-XEXCH50 250 OK " SMTP -> FROM SERVER: 250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM 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

oadaeh’s picture

but then got this massive error report (it printed without newlines like this sorry). I don't really know where to start fixing this one,

That is the debugging information you get when you check the 'Enable debugging' check box at the bottom of the administrative settings page. Just uncheck that box to make all that stuff go away.

also is there a way to check if I have SSL installed?

If you do not have SSL correctly installed on the server hosting your Drupal installation, you won't get the option to enable it. Currently, there is no way of checking if the remote SMTP server supports SSL.

(does my port 465 have to be open because its not).

No, it does not.

SMTP -> get_lines(): $data is "250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM 250-X-LINK2STATE 250-XEXCH50 250 OK " SMTP -> FROM SERVER: 250-enews.nrl.navy.mil Hello [10.1.0.226] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-EXPS GSSAPI NTLM 250-AUTH GSSAPI NTLM 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

It looks like the SMTP server you are sending through doesn't support some aspect of your configuration. Try one of these two options:

  • If you're using a plain, vanilla configuration, try at least adding in your authentication information (fill in the 'Username' and 'Password' fields).
  • If you're not using a plain, vanilla configuration, try using one (port 25, no SSL or TLS and no authentication settings [nothing in the 'Username' and 'Password' fields]) to see what you get.

You'll need to leave the 'Enable debugging' check box enabled to see what the server returns. You might also try that with your Gmail configuration to see if anything shows up there.

nipper-1’s picture

The SMTP module just doesn't come up. I have nothing hidden, I am the admin, I have uploaded it twice (once after deleting it the 1st time) and run the site update script both times. It simply wont show up, even when putting in /index.php?q=admin/settings/smtp

whats wrong? help!

bmeier’s picture

The problem I had was that Private Upload was somehow preventing it from being seen. I disabled that module and was able to see SMTP, you should check your permission settings and see if anything looks off.

arhak’s picture

subscribing

akalata’s picture

Status: Active » Closed (fixed)