httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee David <>
Subject [users@httpd] How to make the code of PHP[mail()] work?
Date Sat, 27 Mar 2010 02:07:06 GMT

                  Dear Sir/Madam:

Good day. I am the beginner for PHP With MySQL.

I would like to learn PHP With MySQL as my hobby.

I am trying the code of:

mail($to, $subject, $msg, 'From:' . $email);

But the code of mail() is not functioning.

If anybody is kind enough, please provide some guidances for me to 
implement a

proper setting.

For your info, i am using window XP home edition, Apache server 2.0, PHP
 5.0 & MYSQL 5.1 as my local testing server.

As per your advices, i have allow internet users to use the service of 
SMTP in windows firewall.

From the review server error log, i be able to observe Warning as below:

[Sat Mar 13 13:58:17 2010] [error] [client] PHP Warning:  
mail() [<a href='function.mail'>function.mail</a>]: 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\\test\\report.php on line 30, referer: 

If possible, could show me how configure the php.ini and any relevant 

In my php.ini, i be able to see:

[mail function]

; For Win32 only.

SMTP = localhost

smtp_port = 25
               2 weeks ago 
                                                ; For Win32 only.

;sendmail_from =

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

;sendmail_path =

; Force the addition of the specified parameters to be passed as extra 

; to the sendmail binary. These parameters will always replace the value

; the 5th parameter to mail(), even in safe mode.

;mail.force_extra_parameters =

Warm Regards,

David Lee

View raw message