NotifySend.php
authorAlan Knowles <alan@akkbhome.com>
Wed, 6 Apr 2011 15:27:46 +0000 (23:27 +0800)
committerAlan Knowles <alan@akkbhome.com>
Wed, 6 Apr 2011 15:27:46 +0000 (23:27 +0800)
NotifySend.php

index 497ce36..ec46808 100644 (file)
@@ -65,13 +65,22 @@ class Pman_Core_NotifySend extends Pman
         
         $mxs = $this->mxs($dom);
         
-        foreach($mxs as $)
+        foreach($mxs as $dom) {
+            
+            $mailer = Mail::factory('smtp', array( 'host'         => $dom ));
+            $res = $mailer->send($email['recipients'], $email['headers'], $email['body']);
+            if ($res === true) {
+                // success....
+                $ww = clone($w);
+                $w->sent = date('Y-m-d H:i:s');
+                $w->msgid = $email['headers']['msgid''];
+            }
+            
+                
+            
+        }
         
         
-        Mail::factory('smtp', array( 
-            'host'         => 'smtp.gmail.com', 
-            'persist'      =>  FALSE
-        ));