Page 1 of 1

error when sending email

Posted: Sat Nov 12, 2005 11:34 am
by alexmaster_2004
Hi
I don't know if this is the right place to ask my question or not.
but i hope that anyone could help me.
ok..my problem is:
i have a pc running windowsXP_SP2 and i use PHP 4.3.11 and utilize
the Apache server 3.33.when i try to use the mail() function i get error like this:
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()
i don't know what i should do in the php.ini to make it run.
please anyone could help me.
Thanks in Advance

Posted: Sat Nov 12, 2005 11:58 am
by trukfixer
I think you need to specify a mail server and user/pass for same - windows , I believe, does not have any native "sendmail" - so you need to set up a mail server on windows, or connect to a remote SMTP server .. I might recommend instead to use the phpmailer class http://sourceforge.net/projects/phpmailer/

Bri!

Posted: Sat Nov 12, 2005 12:16 pm
by Buddha443556
Windows XP Pro has a SMTP server that's part of IIS:
http://www.webwizguide.com/asp/tutorial ... XP_pro.asp

Might also use something like something like Richard Heyes SMTP Class:
http://www.phpclasses.org/browse/package/346.html

Posted: Sun Nov 13, 2005 12:20 pm
by twigletmac
In the php.ini is a section for defining your SMTP server - you can probably use the one your ISP told you to use in your normal mail program. You shouldn't really need to setup your own SMTP server.

Mac