DataObjects/Core_notify.php
[Pman.Core] / NotifySmtpCheck.php
index edf0f49..e4887ef 100644 (file)
@@ -9,6 +9,7 @@ class Pman_Core_NotifySmtpCheck extends Pman
     function get()
     {
         $this->check();
+        exit;
     }
     
     function check()
@@ -40,10 +41,12 @@ class Pman_Core_NotifySmtpCheck extends Pman
                     'verify_peer_name'  => false
                 )
             );
-
+            if (empty($settings['port'])) {
+                $settings['port'] = 25;
+            }
             $smtp = new Net_SMTP($server, $settings['port'], $helo, false, 0, $socket_options);
 
-            $smtp->setDebug(true);
+//            $smtp->setDebug(true);
             
             echo "Connecting : {$server}:{$settings['port']} \n";
             
@@ -76,7 +79,7 @@ class Pman_Core_NotifySmtpCheck extends Pman
     {
         $ifconfig = file_get_contents("https://ifconfig.co/");
         $dom = new DomDocument('1.0', 'utf-8');
-        $dom->loadHTML($ifconfig);
+        @$dom->loadHTML($ifconfig);
         
         $xpath = new DOMXPath($dom);