DataObjects/core.sql
[Pman.Core] / NotifySend.php
index 62b448a..6bb00a7 100644 (file)
@@ -94,7 +94,7 @@ class Pman_Core_NotifySend extends Pman
             
             die("send repeat to early\n");
         }
-        if ($opts['debug']) {
+        if (!empty($opts['debug'])) {
             print_r($w);
         }
         
@@ -322,7 +322,7 @@ class Pman_Core_NotifySend extends Pman
                 // try again later..
                 // check last event for this item..
                 
-               
+                //print_r($res);
                 $this->addEvent('NOTIFY', $w, 'GREYLISTED ' . $p->email . ' ' . $res->toString());
                 $w->act_when = date('Y-m-d H:i:s', strtotime('NOW + ' . $retry . ' MINUTES'));
                 $w->update($ww);
@@ -400,8 +400,10 @@ 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);
+        var_dump($m);
+        
+        if (!empty($notify->evtype) && method_exists($object,$m)) {
+            return $object->$m($rcpt, $last_sent_date, $notify, $force);
         }
                 
         
@@ -416,5 +418,8 @@ class Pman_Core_NotifySend extends Pman
         }
         echo $str . "\n";
     }
-    
+    function output()
+    {
+        die("done\n");
+    }
 }
\ No newline at end of file