If a contribution page is configured to Bcc receipts to a given address, the Bcc should not be included in emails to any recipient of that receipt.

In my CiviCRM 4.7.9 site, the Bcc header is correctly not included in any receipt emails, if mail is sent with mail(), i.e., if "mail()" is selected at /civicrm/admin/setting/smtp.

However, it IS visible in the email to the donor, if mail is sent with SMTP, i.e., if "SMTP" is selected at /civicrm/admin/setting/smtp.

FWIW, the SMTP provider in this case is sendgrid, but I'm not sure yet whether that's relevant.

Is this a bug in CiviCRM, or is it an issue with Sendgrid?

Update: A code change as shown here causes Bcc to behave properly in SMTP (sendgrid) and mail(). Makes me think it's a bug that could be fixed in core.

diff --git a/CRM/Utils/Mail.php b/CRM/Utils/Mail.php
index 57453a0..be3f052 100644
--- a/CRM/Utils/Mail.php
+++ b/CRM/Utils/Mail.php
@@ -267,6 +267,7 @@ class CRM_Utils_Mail {
       if (!empty($headers['Bcc'])) {
         $to[] = CRM_Utils_Array::value('Bcc', $headers);
+        unset($headers['Bcc']);
     if (is_object($mailer)) {
  • Sounds like a bug to me! Aug 11 '16 at 15:39
  • Right. Probably could have researched it just a tad more before posting. Thanks @ParvezSaleh
    – TwoMice
    Aug 11 '16 at 16:20

Yes, it's a bug, which is now fixed: https://issues.civicrm.org/jira/browse/CRM-19173

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.