From: edward Date: Thu, 14 Jul 2016 06:23:36 +0000 (+0800) Subject: NotifySend.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=4aa2031acc83a816ad24a1734305296ff20f6f4b NotifySend.php --- diff --git a/NotifySend.php b/NotifySend.php index 6adb5382..5da3567a 100644 --- a/NotifySend.php +++ b/NotifySend.php @@ -377,24 +377,28 @@ class Pman_Core_NotifySend extends Pman // this normally will happen if you sent Pman_Core_NotifySend['host'] if (isset($ff->Mail['host']) && $ff->Mail['host'] == $mx && !empty($ff->Mail['auth'] )) { + $username = $ff->Mail['username'] ; + $password = $ff->Mail['password'] ; + if(!empty($ff->Core_Notify)){ - $preferHost = false; - foreach ($ff->Core_Notify['routes'] as $server => $settings){ if(!in_array($dom, $settings['domains'])){ continue; } $mailer->host = $server; + $username = $settings['username']; + $password = $settings['password']; + break; } } $mailer->auth = true; - $mailer->username = $ff->Mail['username'] ; - $mailer->password = $ff->Mail['password'] ; + $mailer->username = $username; + $mailer->password = $password; } $res = $mailer->send($p->email, $email['headers'], $email['body']);