每次在项目中使用mail()标记时,我都会收到此错误。
Warning: mail(): "sendmail_from" not set in
php.ini or custom "From:" header missing in C:\xampp\htdocs\alex\contact.php on line 75
这是我的代码:
$to = "ahmedmaheratya@gmail.com";
$subject = "A New Message From" . $email;
$body = "Here's the Message <br>" . $msg;
mail($to, $subject, $body, "try@website.com");
redirestMsg($theMsg, 'back', 900);
是因为我在本地主机上吗?还是有些错字?