DataObjects/Core_notify_recur.php
[Pman.Core] / NotifySend.php
index 9440ac9..69bb862 100644 (file)
@@ -276,7 +276,7 @@ class Pman_Core_NotifySend extends Pman
             if ($res === true) {
                 // success....
                 
-                $ev = $this->addEvent('NOTIFY', $w, 'SUCCESS: ' .$email['headers']['Subject']);
+                $ev = $this->addEvent('NOTIFYSENT', $w, "{$w->to_email} - {$email['headers']['Subject']}");
                
                 
                 
@@ -393,9 +393,15 @@ class Pman_Core_NotifySend extends Pman
          
      }
      **/
-    function makeEmail($object, $rcpt, $last_sent_date, $notify)
+    function makeEmail($object, $rcpt, $last_sent_date, $notify, $force =false)
     {
-        return $object->toEmail($rcpt, $last_sent_date, $notify);
+        $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);
     }
     
     function debug($str)