我的也搞定了,是因为下面这个原因,做了下面这一步,就行了
打开do_sendmail.php
找到
//开始发送
include_once(S_ROOT.'./source/function_sendmail.php');
foreach ($list as $cid => $value) {
$mlist = $sublist[$cid];
if($value['email'] && $mlist) {
$subject = getstr($mlist[0]['subject'], 80, 0, 0, 0, 0, -1);
$message = '';
foreach ($mlist as $subvalue) {
if($subvalue['message']) {
$message .= "<br><strong>$subvalue[subject]</strong><br>$subvalue[message]<br>";
} else {
$message .= $subvalue['subject'].'<br>';
}
}
if(!sendmail($value['email'], $subject, $message)) {
runlog('sendmail', "$value[email] sendmail failed.");
}
}
}
//更新用户最后发送时间
if($touids) {
$_SGLOBAL['db']->query("UPDATE ".tname('space')." SETlastsend='$_SGLOBAL[timestamp]' WHERE uid IN (".simplode($touids).")");
}
//删除邮件
$_SGLOBAL['db']->query("DELETE FROM ".tname('mailcron')." WHERE cid IN (".simplode($cids).")");
$_SGLOBAL['db']->query("DELETE FROM ".tname('mailqueue')." WHERE cid IN (".simplode($cids).")");
调整下顺序,修改为:
//更新用户最后发送时间
if($touids) {
$_SGLOBAL['db']->query("UPDATE ".tname('space')." SETlastsend='$_SGLOBAL[timestamp]' WHERE uid IN (".simplode($touids).")");
}
//删除邮件
$_SGLOBAL['db']->query("DELETE FROM ".tname('mailcron')." WHERE cid IN (".simplode($cids).")");
$_SGLOBAL['db']->query("DELETE FROM ".tname('mailqueue')." WHERE cid IN (".simplode($cids).")");
//开始发送
include_once(S_ROOT.'./source/function_sendmail.php');
foreach ($list as $cid => $value) {
$mlist = $sublist[$cid];
if($value['email'] && $mlist) {
$subject = getstr($mlist[0]['subject'], 80, 0, 0, 0, 0, -1);
$message = '';
foreach ($mlist as $subvalue) {
if($subvalue['message']) {
$message .= "<br><strong>$subvalue[subject]</strong><br>$subvalue[message]<br>";
} else {
$message .= $subvalue['subject'].'<br>';
}
}
if(!sendmail($value['email'], $subject, $message)) {
runlog('sendmail', "$value[email] sendmail failed.");
}
}
} |