我有一個使用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