Menu
I’m trying to implement this script to send email:
[code=php]
<?php
$to = “[email protected]”;
$subject = “Test mail”;
$message = “Hello! This is a simple email message.”;
$from = “[email protected]”;
$headers = “From: $from”;
$sentmail = mail($to,$subject,$message,$headers);
// if your email succesfully sent
if($sentmail){
echo “Email Has Been Sent .”;
}
else {
echo “Cannot Send Email “;
}
?>
I ran the script using “php -q mail.php” and the output I have is Email Has Been Sent but I never get the email. any of you knows what can it be wrong?