DataObjects/Core_enum.php
[Pman.Core] / NotifySend.php
index d3fa06d..4851828 100644 (file)
@@ -415,7 +415,8 @@ class Pman_Core_NotifySend extends Pman
                             $this->errorHandler(date('Y-m-d h:i:s ') . " Too many emails sent by {$dom}");
                         }
                         
-                        
+                        // that make's this test obsolete...
+                        /*
                         
                         $core_notify = DB_DataObject::factory($this->table);
                         $core_notify->domain_id = $core_domain->id;
@@ -429,7 +430,7 @@ class Pman_Core_NotifySend extends Pman
                             $w->update($old);
                             $this->errorHandler(date('Y-m-d h:i:s ') . " Too many emails sent by {$dom}");
                         }
-                        
+                        */
                         
                         
                         
@@ -453,7 +454,9 @@ class Pman_Core_NotifySend extends Pman
             if ($res === true) {
                 // success....
                 
-                $ev = $this->addEvent('NOTIFYSENT', $w, "{$w->to_email} - {$email['headers']['Subject']}");
+                $successEventName = (empty($email['successEventName'])) ? 'NOTIFYSENT' : $email['successEventName'];
+                
+                $ev = $this->addEvent($successEventName, $w, "{$w->to_email} - {$email['headers']['Subject']}");
                 
                 $ev->writeEventLog($this->debug_str);