fix #7696 - fill in to_email on failure - so that email will get blacklisted eventually
[Pman.Core] / NotifySend.php
index caa6ec4..9e46249 100644 (file)
@@ -236,6 +236,7 @@ class Pman_Core_NotifySend extends Pman
             $w->sent = (!$w->sent || $w->sent == '0000-00-00 00:00:00') ? $w->sqlValue('NOW()') : $w->sent; // do not update if sent.....
             $w->msgid = '';
             $w->event_id = $ev->id;
+            $w->to_email = $p->email; 
             $w->update($ww);
             $this->errorHandler(date('Y-m-d h:i:s ') . 
                     (isset($email['error'])  ?
@@ -284,6 +285,7 @@ class Pman_Core_NotifySend extends Pman
             $w->sent = (!$w->sent || $w->sent == '0000-00-00 00:00:00') ? $w->sqlValue('NOW()') : $w->sent; // do not update if sent.....
             $w->msgid = '';
             $w->event_id = $ev->id;
+            $w->to_email = $p->email; 
             $w->update($ww);
             $this->errorHandler(date('Y-m-d h:i:s ') . "INVALID ADDRESS: " . $p->email. "\n");
             
@@ -331,6 +333,7 @@ class Pman_Core_NotifySend extends Pman
             $w->sent = (!$w->sent || $w->sent == '0000-00-00 00:00:00') ? $w->sqlValue('NOW()') : $w->sent; // do not update if sent.....
             $w->msgid = '';
             $w->event_id = $ev->id;
+            $w->to_email = $p->email; 
             $w->update($ww);
             $this->errorHandler(date('Y-m-d h:i:s') . " - FAILED -  BAD EMAIL - {$p->email} \n");
             
@@ -345,6 +348,7 @@ class Pman_Core_NotifySend extends Pman
             $w->sent = (!$w->sent || $w->sent == '0000-00-00 00:00:00') ? $w->sqlValue('NOW()') :$w->sent; // do not update if sent.....
             $w->msgid = '';
             $w->event_id = $ev->id;
+            $w->to_email = $p->email; 
             $w->update($ww);
             $this->errorHandler(date('Y-m-d h:i:s') . " - FAILED -  GAVE UP TO OLD - {$p->email} \n");
         }