Click to See Complete Forum and Search --> : Problem with mail function.


simbako
09-01-2006, 03:30 AM
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:\wwwroot\wwwdevel\works\mail.php on line 43
:( :confused:
i am using apache in my windows desktop and is using mail function of PHP, what are the things that i should configure first before i can succesfully use this one? :(

Brooksie155
09-01-2006, 05:10 AM
check you php.ini file is correctly configured for sending mail, I think I remember reading somewhere that if some lines have not been commented out windows gets a bit confused i.e.

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

Also I think you may need a mailserver application running, similar to sendmail on unix. I don't think windows comes with one built in.

A good reference for this is the Zend PHP Certification guide, unfortunatly I don't have it with me but will look up over the weekend.

littlened
09-01-2006, 07:19 AM
check you php.ini file is correctly configured for sending mail, I think I remember reading somewhere that if some lines have not been commented out windows gets a bit confused i.e.

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

Also I think you may need a mailserver application running, similar to sendmail on unix. I don't think windows comes with one built in.

A good reference for this is the Zend PHP Certification guide, unfortunatly I don't have it with me but will look up over the weekend.

what brokksiee155 said is correct, if you dont have a mailserver running on your computer php wont be able to connect to it.