I am new to PHP & want to we send email from localhost to my gmail address.
I am using ubuntu 9.10 & have already installed libphp-phpmailer from Synaptic Package manager option.
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