<分区>
我想编写一个带有激活邮件等的简单注册表单的脚本。但出于某种原因,mail() 没有发送电子邮件,或者我的 3 个不同的电子邮件帐户(hotmail、gmail、yahoo)没有收到它们,因此甚至没有将它们放入垃圾邮件文件夹。
代码:
<?php
$mailto = 'xxx@example.com';
$subject = 'the subject';
$message = 'the message';
$from = 'system@example.net';
$header = 'From:'.$from;
if(mail($mailto,$subject,$message,$header)) {
echo 'Email on the way';
}
?>
每次它输出“Email on the way”所以 mail() 返回 true,对吗?我真的不明白,我什至试图关闭我的小告密者(尽管我没有阻止 SMTP)。