NotifySend.php
[Pman.Core] / NotifySend.php
index df78080..1d77c63 100644 (file)
@@ -395,15 +395,14 @@ class Pman_Core_NotifySend extends Pman
                 }
                 
                 if (!empty($email['bcc'])) {
-                    $cmailer = Mail::factory('smtp', array(
-                       //'host'    => $dom ,
-                      //  'debug' => true
-                    ));
+                    $cmailer = Mail::factory('smtp', isset($ff->Mail) ? $ff->Mail : array() );
                     $email['headers']['Subject'] = "(CC): " . $email['headers']['Subject'];
                     $res = $cmailer->send($email['bcc'],
                                   $email['headers'], $email['body']);
-                    if (!$res) {
+                    if (!$res || is_a($res, 'PEAR_Error')) {
                         echo "could not send bcc..\n";
+                    } else {
+                        echo "Sent BCC to {$email['bcc']}\n";
                     }
                 }