3 require_once 'Pman.php';
4 require_once "Mail.php";
5 require_once 'Mail/smtpmx.php';
7 class Pman_Core_NotifySmtpCheck extends Pman
11 $ff = HTML_FlexyFramework::get();
14 empty($ff->Core_Notify) ||
15 empty($ff->Core_Notify['routes'])
22 foreach ($ff->Core_Notify['routes'] as $server => $settings){
23 if(empty($settings['domains']) || empty($settings['username']) || empty($settings['password'])){
24 $error[] = "{$server} missing domains / username / password";
28 foreach ($settings['domains'] as $dom){
29 // $mailer = Mail::factory('smtp', array(
31 // 'localhost' => $server,
34 // 'username' => $settings['username'],
35 // 'password' => $settings['password']
38 // print_R($mailer);exit;
42 'mailname' => $settings['username']
45 $smtpmx = new Mail_smtpmx($params);
47 $smtpmx->_smtp = new Net_SMTP($server, $smtpmx->port, $smtpmx->mailname);
49 print_R($smtpmx->_smtp);exit;
51 $res = $smtpmx->_smtp->connect($smtpmx->timeout);
53 $smtpmx->_smtp->disconnect();
57 // $mx = $smtpmx->_getMx($dom);
59 // foreach ($mx as $mserver => $mpriority) {
61 // $smtpmx->_smtp = new Net_SMTP($mserver, $smtpmx->port, $smtpmx->mailname);
63 //// print_R($smtpmx);exit;
64 // $res = $smtpmx->_smtp->connect($smtpmx->timeout);
66 // $smtpmx->_smtp->disconnect();
68 // print_R($res);exit;