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)) {