Page 1 of 1
PHP mail trouble
Posted: Thu May 08, 2003 6:21 pm
by scottae
I am trying to follow a basic tutorial on how to send mail using PHP and I got this error message:
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:\Program Files\Apache Group\Apache2\htdocs\pma24_code\9\listing9.12.php on line 24
Anyone have any suggestions???

Posted: Thu May 08, 2003 7:14 pm
by Doolittle
You're not running a mailserver on that server... You need to check out the php.ini file and give it a mail server to mail from

Posted: Thu May 08, 2003 10:35 pm
by scottae
Well, I am not sure how it needs to be configured. This is what I have in my php.ini file now where it talks about the mail stuff:
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Syslog]
; Whether or not to define the various syslog variables (e.g. $LOG_PID,
; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In
; runtime, you can define these variables by calling define_syslog_variables().
define_syslog_variables = Off
[mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from =
enders902@charter.net
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
What do I need to change?

Posted: Fri May 09, 2003 1:01 am
by m3mn0n
localhost is not the mail server is it? Use whatever you use with Outlook.
If you where using the same ISP as me, it would be as following:
Posted: Fri May 09, 2003 7:51 pm
by scottae
That was the problem.........thank you for your help.

Posted: Fri May 09, 2003 10:13 pm
by m3mn0n
no problem
