上下文:
问题:
。
到目前为止我尝试过的是:
我不知道该去哪找了。有人能帮助那些面临同样或类似问题的人吗?
谢谢!
发布于 2022-09-29 12:18:34
检查phpmail函数是否正常工作。您可以使用以下代码来检查它。
<?PHP
$sender = 'someone@somedomain.tld';
$recipient = 'you@yourdomain.tld';
$subject = "php mail test";
$message = "php test message";
$headers = 'From:' . $sender;
if (mail($recipient, $subject, $message, $headers))
{
echo "Message accepted";
}
else
{
echo "Error: Message not accepted";
}
?>
test.php
如果它显示的是"Error: Message not“,请告诉您的提供者,标准的php "mail()”函数返回FALSE。建议包含已使用的php测试脚本,以向您的提供者显示问题不是由所使用的php脚本造成的。
https://stackoverflow.com/questions/73858273
复制相似问题