Thanks in advance.

I'm getting the error message (see below) when trying to send mail via the contact form.

error message
"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\wamp\www\drupal_4\includes\mail.inc on line 193."

any help correcting this would be much appreciated.

Comments

Jaypan’s picture

Are you using a server on your local computer or a remote host?

bvana1’s picture

My web pages are stored on my localhost/drupal_4/
also using wampserver

I checked my php.ini file and the settings are....
SMTP = localhost
smtp_port = 25

does that help?

Thanks

Jaypan’s picture

Wamp doesn't have a mail server built into it, so it can't natively send SMTP mail.

bvana1’s picture

So if I understand correctly, I need to download and install something like hmailserver?

Thanks again for your help

Jaypan’s picture

I personally just use an external smtp server and send my mail through that. But theoretically you could install a local smtp server and send mail through it. I've never done it myself though. If you manage to figure it out, you should post the details here - I'm sure many people would find it useful.

bvana1’s picture

Thanks again

Why is this sooooo f-ing complicated? (I've been dealing with this for 2 days - so far....)

What external smtp server would YOU reccommend?

All I want to do is send mail from my contact form. My site is installed on my localhost, I've added the modules MIME,SEND and SMTP AUTHENTICATOR and still am getting the same error message (see below).
My php.ini file has the following values.
SMTP = localhost
smtp_port = 25

do these seem correct?

error message "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\wamp\www\drupal_4\sites\all\modules\mimemail\mimemail.module on line 239."

what is this telling me?

Jaypan’s picture

I use my external smtp server on the hosting account I pay for. I set up a dummy email account. I believe gmail will let you do this as well though.

You will have to add the auth_username and auth_password for the smtp account you set up to your php.ini settings, though I can't remember if that is the exact text or not so you should google around and check that.

gausarts’s picture

love, light n laughter

psnreddy’s picture

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:\xampp\htdocs\mail.php on line 6

Hossam_ali’s picture

13down voteaccepted

It is configured to use localhost:25 for the mail server.

The error message says that it can't connect to localhost:25.

Therefore you have two options:

  1. Install / Properly configure an SMTP server on localhost port 25
  2. Change the configuration to point to some other SMTP server that you can connect to