freaknut Posted August 16, 2007 Share Posted August 16, 2007 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? Quote Link to comment Share on other sites More sharing options...
freaknut Posted August 17, 2007 Author Share Posted August 17, 2007 I needed to copy my php.ini file to the Windows directory, as that is where IIS keeps looking for it. It solved my problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.