From dadba857c33a9078c5dcfe5c72fb970a8b7e62ee Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 6 Apr 2011 23:48:46 +0800 Subject: [PATCH] NotifySend.php --- NotifySend.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/NotifySend.php b/NotifySend.php index dc519ee5..f005a32e 100644 --- a/NotifySend.php +++ b/NotifySend.php @@ -58,6 +58,17 @@ class Pman_Core_NotifySend extends Pman $ar = $l->fetchAll('sent'); $last = empty($ar) ? date('Y-m-d H:i:s', 0) : $ar[0]; + // find last event.. + $ev = DB_DataObject::factory('Events'); + $ev->on_id = $w->id; // int(11) + $ev->od_table = $this->table; + $ev->limit(1); + $ev->orderBy('event_when DESC'); + $ar = $ev->fetchAll('event_when'); + $last_event = empty($ar) ? 0 : $ar[0]; + + + $email = $o->toEmail($p,$last); // should we fetch the watch that caused it.. - which should contain the method to call.. @@ -65,6 +76,10 @@ class Pman_Core_NotifySend extends Pman $mxs = $this->mxs($dom); $ww = clone($w); + + + + foreach($mxs as $dom) { $mailer = Mail::factory('smtp', array( 'host' => $dom )); -- 2.39.2