DataObjects/Core_notify_recur.php
[Pman.Core] / NotifySend.php
index 74fb797..69bb862 100644 (file)
@@ -276,7 +276,7 @@ class Pman_Core_NotifySend extends Pman
             if ($res === true) {
                 // success....
                 
-                $ev = $this->addEvent('NOTIFY', $w, "SUCCESS: {$w->to_email} - {$email['headers']['Subject']}");
+                $ev = $this->addEvent('NOTIFYSENT', $w, "{$w->to_email} - {$email['headers']['Subject']}");
                
                 
                 
@@ -395,6 +395,12 @@ class Pman_Core_NotifySend extends Pman
      **/
     function makeEmail($object, $rcpt, $last_sent_date, $notify, $force =false)
     {
+        $m = 'notify'. $notify->evtype;
+        if (!empty($notify->evtype) && method_exists($object,'notify'. $notify->evtype)) {
+            $object->$m($rcpt, $last_sent_date, $notify, $force);
+        }
+                
+        
         return $object->toEmail($rcpt, $last_sent_date, $notify, $force);
     }