Page 1 of 1

PHP Mail.

Posted: Wed Aug 10, 2005 4:23 pm
by quadoc
I'm trying to send email and got the following errors. Could someone tells me what causing this? :? I'm using IIS 5.0 server. Thanks...

Code: Select all

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:\Inetpub\wwwroot\schoolProject\mail.php on line 30

Posted: Wed Aug 10, 2005 4:30 pm
by s.dot
the settings for your mailserver are incorrect. It needs a valid smtp server, and valid settings for them in your ini

Posted: Wed Aug 10, 2005 4:38 pm
by quadoc
When I ran the php.test I saw the following.

SMTP localhost localhost
smtp_port 25 25

Posted: Wed Aug 10, 2005 4:42 pm
by s.dot

Code: Select all

ini_set("smtp","ip.address.to.yourmachine");
ini_set("smtp_port","25");
I think under windows you might have to use your IP address instead of localhost. Not positive though

Posted: Thu Aug 11, 2005 9:18 am
by quadoc
Thanks, let me try that. :)