}
$this->server = DB_DataObject::Factory('core_notify_server')->getCurrent($this);
-
+ if (!$force && $w->server_id != $this->server->id) {
+ $this->errorHandler("Server id does not match - use force to try again\n");
+ }
if (!empty($opts['debug'])) {
print_r($w);
$res = $mailer->send($p->email, $email['headers'], $email['body']);
+ if (is_object($res)) {
+ $res->backtrace = array();
+ }
$this->debug("GOT response to send: ". print_r($res,true));
if ($res === true) {
$errmsg= $res->userinfo['smtpcode'] . ':' . $res->userinfo['smtptext'];
}
//print_r($res);
- $this->addEvent('NOTIFY', $w, 'GREYLISTED - ' . $errmsg);
+ $ev = $this->addEvent('NOTIFY', $w, 'GREYLISTED - ' . $errmsg);
$this->server->updateNotifyToNextServer($w, strtotime('NOW + ' . $retry . ' MINUTES'),true);