Jump to content

[SOLVED] Failed to connect to mailserver at "localhost" port 25


Recommended Posts

I am using IIS6 and PHP 5.2.3 on a Server 2003 machine. I keep getting the following 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 D:\Domains\csoftwares.com\wwwroot\contactus.php on line 131

 

The thing that is most frustrating about it is that I have SMTP = mail.mydomain.com. I have even tried changing smtp_port to equal 2525, but no matter what I change those two variables to, it tries to connect to localhost on port 25. If I define these variables on the page with ini_set, it works perfectly, but I host several websites and need this to be working for everyone on the server without them being forced to put that in all of their pages.

 

I also change the settings for error reporting and logging, but that doesn't seem to do anything either. It's like it's not reading these variables. I've searched for other php.ini files on the server, and the one I've been editing is the only one.

 

Any ideas?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.