View Full Version : mail function didn't work in my local system

07-25-2008, 06:02 AM

i used mail function in my local system.In that i didn't get any errors and mail didn't receive.And in my php.ini consists

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = me@example.com

at the time of installation of php it asks the smtp and from address.And i give as smtp=localhost and from address as me@example.com

And my php code is

$to = "sravanik@eminosoft.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "me@example.com";
$headers = "From: $from";
echo "Mail Sent.";

Anybody plz tell that what's the solution for that.plz help me.

07-25-2008, 07:29 AM
You need your own smtp server to send mail from your local system. Localhost won't work.