我有一个使用mail()发送邮件的php脚本。问题在于,它一直等待,直到收到来自邮件程序的确认信息,然后才继续...我想跳过此步骤。有没有办法将它默认设置为true或者是否不等,等等?以下是我所指的代码部分。谢谢。如何让邮件()等待确认(true)
if (file_exists($attachment)) {
sendmail_attach_new($email, $subject, $msg_text, $msg, $attachment, $mailheaders, "$from_name <$from_email>");
} elseif ($msg) {
if(ini_get('safe_mode')){
mail($email, $subject, $msg, $mailheaders);
}else{
mail($email, $subject, $msg, $mailheaders, "-f$from_email");
}
} elseif ($msg_text) {
if(ini_get('safe_mode')){
mail($email, $subject, $msg_text, $mailheaders);
}else{
mail($email, $subject, $msg_text, $mailheaders, "-f$from_email");
}
}
//update the mailing list for confirmation of sent mail
$sql = "update $tableMail set mid ='$mid' where id='$DATA[id]'";
sql_query($sql);
$logbuffer .= "Mailed: $email<br>";
$row++;
}
这是显而易见的解决方案。 – awm 2011-02-27 01:39:09