Notify.php
[Pman.Core] / Notify.php
index 9e579bb..f7cbe57 100644 (file)
@@ -166,7 +166,7 @@ class Pman_Core_Notify extends Pman
             // standard
             
             //$w->whereAdd('act_when > sent'); // eg.. sent is not valid..
-            $w->whereAdd("sent < '1970-01-01'"); // eg.. sent is not valid..
+            $w->whereAdd("sent < '1970-01-01' OR sent IS NULL"); // eg.. sent is not valid..
             
             $w->whereAdd('act_start > NOW() - INTERVAL 14 DAY'); // ignore the ones stuck in the queue
             if (!$this->force) {
@@ -231,7 +231,7 @@ class Pman_Core_Notify extends Pman
                 sleep(3);
                 continue;
             }
-            if ($this->poolHasDomain($p->person_id_email)) {
+            if ($this->poolHasDomain($p->person_id_email) > $this->max_to_domain) {
                 
                 if ($pushed === false) {
                     // we only try once to requeue..
@@ -260,7 +260,7 @@ class Pman_Core_Notify extends Pman
          
         foreach($requeue as $p) {
             $pp = clone($p);
-            $p->act_when = strtotime($p->act_when .  ' + 1 MINUTE');
+            $p->act_when = $p->sqlValue('NOW + INTERVAL 1 MINUTE');
             $p->update($pp);
             
         }