NotifySend.php
authorAlan Knowles <alan@roojs.com>
Fri, 12 Jun 2015 02:44:53 +0000 (10:44 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 12 Jun 2015 02:44:53 +0000 (10:44 +0800)
NotifySend.php

index d06d42a..47d834c 100644 (file)
@@ -353,6 +353,15 @@ class Pman_Core_NotifySend extends Pman
                     'debug' => 1,
                     'debug_handler' => array($this, 'debugHandler')
                 ));
+            
+            // if the host is the mail host + it's authenticated add auth details
+            // this normally will happen if you sent  Pman_Core_NotifySend['host']
+            if (isset($ff->Mail['host']) && $ff->Mail['host'] == $dom && !empty($ff->Mail['auth'] )) {
+                $mailer->auth = true;
+                $mailer->username = $ff->Mail['username'] ;
+                $mailer->password = $ff->Mail['password'] ;        
+            }
+            
             $res = $mailer->send($p->email, $email['headers'], $email['body']);