johnsnails
johnsnails

Reputation: 2031

BCC Recipients Visible to Eachother

Not sure if this belongs here or not, as I am the one generating the email via PHP.

Basically, using the code below, when anyone in the BCC views the email (at least in gmail where I checked), the BCC recipients can all see each other, see screenshot. BCC Shows a list of recipients

Have any of you seen this behaviour before? I have run the same code on a different server with the same hosting company and it works as expected. Not sure if it is because on the server I am having issues on it has an external mail server set up. I have also tried with PHPMailer and had the same issue.

I have left the 'mailed-by' portion in the image in case something can be found from that.

Here is the code I am using to send the email.

$subject = "BCC Not Working as Expected...";
$body = "BCC Not Working as Expected...";

$headers = [];
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/html; charset=iso-8859-1";
$headers[] = "From: Example <[email protected]>";
$headers[] = "To: Some Person <[email protected]>";
$headers[] = "Bcc: John <[email protected]>, Paul <[email protected]>, Ringo <[email protected]>, George <[email protected]>";

mail(null, $subject, $body, implode("\r\n", $headers));

echo implode("\r\n", $headers);
// Output:
// MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 From: Example To: Some Person Bcc: John , Paul , Ringo , George

Upvotes: 2

Views: 1709

Answers (1)

ritter
ritter

Reputation: 597

This is not something I've seen before, and your implementation looks fine. The recipient of an email can normally see any email address specified by the Sender in the To or Cc fields. If the Sender has specified addresses in the Bcc field, the recipient cannot normally see these. Having said that, some doubt exists about the exact intent of the Bcc field, so there are no guarantees. Please see this article on Wikipedia for more information.

Cheers

Upvotes: 1

Related Questions