I am working on my localhost with php and first of I used this code to send a mail;
<?php
echo "<h1>Sending Email</h1>";
$emailTo = "saroj@gmail.com";
$subject = "I hope this works";
$body = "Test message";
$headers = "From: sarojkumar.sahoo1998@gmail.com";
//$text = str_replace("\n.", "\n..", $text);
if (mail($emailTo, $subject, $body, $headers)) {
echo "Email is sent successfully.";
}else {
echo "email not sent!";
}
?>
And my error is shown in my localhost is like: see error page image
What to do?