give me the correct statement of sending mail using php mail function is this right or some thing wrong only write correct coding please
my coding is this and now tell me my coding is correct or not
PHP Code:
<?php
$to = "don_log2003@yahoo.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "don_log2003@yahoo.com";
$headers = "From: $from";
if(mail($to,$subject,$message,$headers)){
echo "Mail Sent.";
}
else
{
echo "Mail not send.";
}
?>