<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
$headers = &$msg->headers($headers);
$to = array($params['toEmail']);
-
- //get emails from headers, since these are
- //combination of name and email addresses.
- if (CRM_Utils_Array::value('Cc', $headers)) {
- $to[] = CRM_Utils_Array::value('Cc', $headers);
- }
- if (CRM_Utils_Array::value('Bcc', $headers)) {
- $to[] = CRM_Utils_Array::value('Bcc', $headers);
- unset($headers['Bcc']);
+ $result = null;
+ $mailer =& CRM_Core_Config::getMailer( );
+
+ // Mail_smtp and Mail_sendmail mailers require Bcc anc Cc emails
+ // be included in both $to and $headers['Cc', 'Bcc']
+ if (get_class($mailer) != "Mail_mail") {
+ //get emails from headers, since these are
+ //combination of name and email addresses.
+ if ( CRM_Utils_Array::value( 'Cc', $headers ) ) {
+ $to[] = CRM_Utils_Array::value( 'Cc', $headers );
+ }
+ if ( CRM_Utils_Array::value( 'Bcc', $headers ) ) {
+ $to[] = CRM_Utils_Array::value( 'Bcc', $headers );
+ }
}
-
- $result = NULL;
- $mailer = CRM_Core_Config::getMailer();
if (is_object($mailer)) {
CRM_Core_Error::ignoreException();
$result = $mailer->send($to, $headers, $message);
}
$message .= '<li>' . ts('The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.') . '</li>' . '</ul>' . '<p>' . ts('Check <a href="%1">this page</a> for more information.', array(
- 1 => CRM_Utils_System::docURL2('user/initial-set-up/email-system-configuration', TRUE))) . '</p>';
+ 1 => CRM_Utils_System::docURL2('user/advanced-configuration/email-system-configuration', TRUE))) . '</p>';
return $message;
}