php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #48399 Documentation problem with mail() function
Submitted: 2009-05-26 11:25 UTC Modified: 2009-06-21 21:41 UTC
From: jurgen dot westerhof at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jurgen dot westerhof at gmail dot com
New email:
PHP Version: OS:

 

 [2009-05-26 11:25 UTC] jurgen dot westerhof at gmail dot com
Description:
------------
Anyone ever noticed that in the HTML mime mail example above (#4) the BCC addresses are added to $header?

You don't want recipients to view BCC addresses. This would defeat the purpose of BCC as it would reveal recipients as CC does.


This line should be removed from example #4 on function.mail:

$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";

also, these $cc and $bcc addresses are to be concatenated to $to in the last lineof that example:

mail($to.$cc.$bcc, $subject, $message, $headers);

Reproduce code:
---------------
---
From manual page: function.mail
---



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-21 21:41 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The MTA has the job to filter out the BCC header and send the mails there. Concating them into the to field means that they won't be filtered out and can be seen by everybody (who can see the mail).
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 13:00:01 2026 UTC