NotifySmtpCheck.php
[Pman.Core] / NotifySmtpCheck.php
index 2aa4d13..827dda3 100644 (file)
@@ -6,6 +6,16 @@ require_once 'Mail/smtpmx.php';
         
 class Pman_Core_NotifySmtpCheck extends Pman
 {
+    static $cli_desc = "Check SMTP";
+    static $cli_opts = array();
+        
+    function get()
+    {
+        $this->check();
+        
+    }
+    
     function check()
     {
         $ff = HTML_FlexyFramework::get();
@@ -37,16 +47,16 @@ class Pman_Core_NotifySmtpCheck extends Pman
 //                
 //                print_R($mailer);exit;
                 
-                $params = array(
-                    'netdns' => false
-                );
-                
-                $smtpmx = new Mail_smtpmx($params);
-                $smtpmx->debug = true;
+//                $params = array(
+//                    'netdns' => false
+//                );
                 
-                $smtpmx->_smtp = new Net_SMTP($server, $smtpmx->port, $smtpmx->mailname);
+//                $smtpmx = new Mail_smtpmx($params);
+//                $smtpmx->debug = true;
                 
-                $smtpmx->_smtp->setDebug(true);
+                $smtp = new Net_SMTP($server, 25, $dom);
+                $smtp->setDebug(true);
+                print_R($smtp);
                 
 //                print_R($smtpmx->_smtp);exit;
                 
@@ -56,9 +66,9 @@ class Pman_Core_NotifySmtpCheck extends Pman
                     print_R('error?????');exit;
                 }
             
-                $smtpmx->_smtp->disconnect();
-
-                print_R($res);exit;
+//                $smtpmx->_smtp->disconnect();
+                print_r("resutlt : {$res} \n");
+                exit;
                     
 //                $mx = $smtpmx->_getMx($dom);
 //