我正在使用 PEAR Mail_Queue,一切正常,除非我试图向“坏”收件人发送电子邮件(如“òla@test.com”、“uuu@test,com”、“test@test. com.com")
当队列发现错误的收件人时,它就会停止,将所有其他邮件留在数据库队列表中......
我只想让它跳转到下一封邮件,删除(或不删除)队列表中的坏邮件......也许我需要的只是一些错误处理......
我正在使用的代码(如果您需要更多代码,请询问:)):
/* How many mails could we send each time the script is called */
$max_amount_mails = 10;
$query=mysql_query("SELECT count(*) FROM mail_queue ORDER by id asc");
$num_tosend= mysql_result($query, 0, 0);
$num_mail=ceil($num_tosend/$max_amount_mails);
/* we use the db_options and mail_options from the config again */
$mail_queue =& new Mail_Queue($db_options, $mail_options);
$mail_queue->setBufferSize(10);
$contaEmailSpeditesi=0;
/* really sending the messages */
for($i=1;$i<=$num_mail;$i++){
$mail_queue->sendMailsInQueue($max_amount_mails,MAILQUEUE_START,1);
sleep(2);
}
谢谢 !!