BCC & CC Not Working in Email Templates

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 22, 2016   (RSS)

By Perchpole - September 22, 2016

Hello, All -

I'm sure I've seen this problem reported before. My email template is working perfectly - except it will not send a BCC. I've tried every permutation of Cc & Bcc known to man - but it just doesn't work:

$emailHeaders = emailTemplate_load(array(
  'template' => $emailTemplate,
  'subject' => $emailSubject,
  'from' => 'info@parp.org.uk',
  'to' => 'info@blogs.org.uk',
  'headers' => array(
    'CC' => 'info@me.com',
    'BCC' => 'info@them.com',
   ),
  'placeholders' => array(
    'tableName' => $tableName,
  etc...
));
$mailErrors   = sendMessage($emailHeaders);
if ($mailErrors) { die("Mail Error: $mailErrors"); }

The templates works as expected in all other respects.

What am I doing wrong here?

:0/

Perch

By Djulia - September 22, 2016

Hello,

$emailHeaders = emailTemplate_load(array(
  'template' => $emailTemplate,
  'subject' => $emailSubject,
  'from' => 'info@parp.org.uk',
  'to' => 'info@blogs.org.uk',
  'placeholders' => array(
    'tableName' => $tableName,
  etc...
));
$emailHeaders['headers']['CC']  = $email_cc;
$emailHeaders['headers']['BCC'] = $email_bcc;
$mailErrors   = sendMessage($emailHeaders);
if ($mailErrors) { die("Mail Error: $mailErrors"); }

:)

Djulia