NotifySmtpCheck.php
authoredward <edward@roojs.com>
Thu, 14 Jul 2016 03:38:33 +0000 (11:38 +0800)
committeredward <edward@roojs.com>
Thu, 14 Jul 2016 03:38:33 +0000 (11:38 +0800)
NotifySmtpCheck.php

index 42d9966..e6475bd 100644 (file)
@@ -20,12 +20,21 @@ class Pman_Core_NotifySmtpCheck extends Pman
         require_once "Mail.php";
         
         foreach ($ff->Core_Notify['routes'] as $server => $settings){
-            if(empty($settings['username']) || empty($settings['password'])){
-                $error[] = "{$server} missing username or password";
+            if(empty($settings['domains']) || empty($settings['username']) || empty($settings['password'])){
+                $error[] = "{$server} missing domains / username / password";
                 continue;
             }
             
-            $smtp = Mail::factory();
+            foreach ($settings['domains'] as $dom){
+                $mailer = Mail::factory('smtp', array(
+                    'host'    => $dom ,
+                    'localhost' => $server,
+                    'timeout' => 15,
+                    
+                ));
+            }
+            
+            
         }
     }