NotifySend.php
[Pman.Core] / NotifySend.php
index 8bcb973..4a3abc2 100644 (file)
@@ -210,16 +210,19 @@ class Pman_Core_NotifySend extends Pman
                      "Notification event cleared (not required any more)" 
                     ."\n");
         }
+        if (is_a($email, 'PEAR_Error')) {
+            $email =array(
+                'error' => $email->toString()
+            );
+        }
         
-        if (empty($p) && !empty($email['rcpts'])) {
+        if (empty($p) && !empty($email['recipients'])) {
             // make a fake person..
             $p = (object) array(
-                'email' => $email['rcpts']
+                'email' => $email['recipients']
             );
         }
-        print_R($email);exit;
-        
-        
+         
         if ($email === false || isset($email['error']) || empty($p)) {
             // object returned 'false' - it does not know how to send it..
             $ev = $this->addEvent('NOTIFY', $w, isset($email['error'])  ?
@@ -355,8 +358,6 @@ class Pman_Core_NotifySend extends Pman
         
         foreach($mxs as $dom) {
             
-            
-            
             if (!isset($ff->Mail['helo'])) {
                 $this->errorHandler("config Mail[helo] is not set");
             }
@@ -375,6 +376,11 @@ class Pman_Core_NotifySend extends Pman
             // if the host is the mail host + it's authenticated add auth details
             // this normally will happen if you sent  Pman_Core_NotifySend['host']
             if (isset($ff->Mail['host']) && $ff->Mail['host'] == $dom && !empty($ff->Mail['auth'] )) {
+                
+                if(!empty($ff->Core_Notify)){
+                    
+                }
+                
                 $mailer->auth = true;
                 $mailer->username = $ff->Mail['username'] ;
                 $mailer->password = $ff->Mail['password'] ;