我正在使用php处理我的localhost,我首先使用此代码发送邮件;
<?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!";
}
?>
我的错误显示在我的localhost中,如: see error page image
怎么办?