NotifySend.php
authorAlan <alan@roojs.com>
Fri, 6 Oct 2023 04:23:06 +0000 (12:23 +0800)
committerAlan <alan@roojs.com>
Fri, 6 Oct 2023 04:23:06 +0000 (12:23 +0800)
NotifySend.php

index 0b71b09..9ad8c14 100644 (file)
@@ -221,8 +221,12 @@ class Pman_Core_NotifySend extends Pman
         
         if (isset($email['later'])) {
             
-            
-            $this->server->updateNotifyToNextServer($w, $email['later'])
+            if (false == $this->server->updateNotifyToNextServer($w, $email['later'])) {
+                // we could not find another server - we can try again.
+                $pp = clone($w);
+                $w->act_when = $email['later'];
+                $w->update($pp);
+            }
  
             $this->errorHandler(date('Y-m-d h:i:s ') . " Delivery postponed by email creator to {$email['later']}");
         }