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;
44 $smtpmx = new Mail_smtpmx($params);
45 $smtpmx->debug = true;
47 $smtpmx->_smtp = new Net_SMTP($server, $smtpmx->port, 'edward.roojs');
49 $smtpmx->_smtp->setDebug(true);
51 // print_R($smtpmx->_smtp);exit;
53 $res = $smtpmx->_smtp->connect($smtpmx->timeout);
55 if (is_a($res, 'PEAR_Error')) {
56 print_R('error?????');exit;
59 // $smtpmx->_smtp->disconnect();
63 // $mx = $smtpmx->_getMx($dom);
65 // foreach ($mx as $mserver => $mpriority) {
67 // $smtpmx->_smtp = new Net_SMTP($mserver, $smtpmx->port, $smtpmx->mailname);
69 //// print_R($smtpmx);exit;
70 // $res = $smtpmx->_smtp->connect($smtpmx->timeout);
72 // $smtpmx->_smtp->disconnect();
74 // print_R($res);exit;