Page 1 of 1

Mail() function

Posted: Sat Aug 07, 2004 4:19 pm
by Calimero
Do I need any special settings for php in order to use this function ?

I got this message returned (I don't have mail server installed, but just to ask, if I jumped over any important step):

Warning: 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 file-path... on line 147.

What does this error say - mistake in code, or just no mail server present ?

Thanks Ahead !

Posted: Sat Aug 07, 2004 4:20 pm
by evilmonkey
You need a mail server. Linux boxes should have sendmail, but if you're on a windows box, you don't have such a luxury. You need to install a mail server and configure it to use port 25, or configure php to use another port.

Posted: Sat Aug 07, 2004 7:28 pm
by qads
or you can point it to your ISP's mail server.