BCC收件人彼此可见

时间:2015-07-20 23:27:03

标签: php email bcc

不确定这是否属于这里,因为我是通过PHP生成电子邮件的人。

基本上,使用下面的代码,当BCC中的任何人查看电子邮件时(至少在我检查过的gmail中),BCC收件人都可以看到对方,看截图。 BCC Shows a list of recipients

你们之前有没有见过这种行为?我在同一个托管公司的不同服务器上运行相同的代码,它按预期工作。不确定是不是因为在服务器上我遇到问题就设置了外部邮件服务器。我也试过PHPMailer并遇到了同样的问题。

我已经在图片中留下了“mailed-by”部分,以防万一可以找到。

以下是我用来发送电子邮件的代码。

$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 <info@example.com>";
$headers[] = "To: Some Person <someperson@example.com>";
$headers[] = "Bcc: John <johnwales.jw@gmail.com>, Paul <paul@example.com>, Ringo <ringo@example.com>, George <george@example.com>";

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

1 个答案:

答案 0 :(得分:1)

这不是我以前见过的,你的实现看起来很好。电子邮件的收件人通常可以在“收件人”或“抄送”字段中看到发件人指定的任何电子邮件地址。如果发件人在密件抄送字段中指定了地址,则收件人通常无法看到这些地址。话虽如此,对Bcc字段的确切意图存在疑问,因此无法保证。有关详细信息,请参阅维基百科上的this article

干杯

相关问题