NotifySmtpCheck.php
[Pman.Core] / NotifySmtpCheck.php
index 0722da3..89c15b2 100644 (file)
@@ -6,6 +6,11 @@ require_once 'Mail/smtpmx.php';
         
 class Pman_Core_NotifySmtpCheck extends Pman
 {
+    function get()
+    {
+        $this->check();
+    }
+    
     function check()
     {
         $ff = HTML_FlexyFramework::get();
@@ -19,7 +24,9 @@ class Pman_Core_NotifySmtpCheck extends Pman
         
         $helo = $this->getHelo();
         
-        $error = array('test');
+        echo "HELO : {$helo} \n";
+        
+        $error = array();
         
         foreach ($ff->Core_Notify['routes'] as $server => $settings){
             if(empty($settings['domains']) || empty($settings['username']) || empty($settings['password'])){
@@ -36,6 +43,10 @@ class Pman_Core_NotifySmtpCheck extends Pman
 
             $smtp = new Net_SMTP($server, $settings['port'], $helo, false, 0, $socket_options);
 
+//            $smtp->setDebug(true);
+            
+            echo "Connecting : {$server}:{$settings['port']} \n";
+            
             $res = $smtp->connect(10);
 
             if (is_a($res, 'PEAR_Error')) {
@@ -43,6 +54,8 @@ class Pman_Core_NotifySmtpCheck extends Pman
                 continue;
             }
 
+            echo "Login As : {$settings['username']}:{$settings['password']} \n";
+            
             $res = $smtp->auth($settings['username'], $settings['password']);
 
             if (is_a($res, 'PEAR_Error')) {