我曾经马上发过php邮件,但现在它可能是页面上php代码的变化,或者我改变了服务器的事实。用户注册后10分钟邮件发送,但如果我去重启apache,它会在apache重启后立即停止。
我应该调整什么设置才能使php或apache再次发送。
P.S。这是随机问题,有时会马上发送!
$from = "mail@otherdomain.com";
$email_address = $ex[0][Email_Address];
$ttc = "mymail@domain.com";
$eol = "\r\n";
$mime_boundary = md5(time());
$headers .= "From:".$from .$eol;
$headers .= "Reply-To:".$from.$eol;
$headers .= "Return-Path:".$from.$eol;
$headers .= "Bcc:".$ttc.$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol;
$headers .= "MIME-Version: 1.0".$eol;
$headers .= "Content-Type: text/html; charset=iso-8859-1".$eol;
if (preg_match("/gmail/",$to))
$headers = str_replace("\r\n","\n",$headers);
$result=mail($email_address,$subject,$mess,$headers);
header("location:home.html");