Send email from localhost to Gmail.
Posted
by MSJ
on Stack Overflow
See other posts from Stack Overflow
or by MSJ
Published on 2010-05-08T09:34:49Z
Indexed on
2010/05/08
9:38 UTC
Read the original article
Hit count: 139
php5
I am new to PHP & want to we send email from localhost to my gmail address.
I used:
$to = "[email protected]";
$subject = "Account Confirmation";
$headers = "From: [email protected]";
$message = "Testing";
$mail = mail($to, $subject, $message, $headers);
if ($mail) {
echo "Mail sent.";
} else {
echo "Some Error occur.";
}
And it show Some Error occur.
please help.
Thanks
© Stack Overflow or respective owner