php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #12242 bug in example mail();
Submitted: 2001-07-18 21:15 UTC Modified: 2001-07-22 05:33 UTC
From: Alain at shockmedia dot nl Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.6 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Alain at shockmedia dot nl
New email:
PHP Version: OS:

 

 [2001-07-18 21:15 UTC] Alain at shockmedia dot nl
Not a real bug but a incorrect example: http://www.php.net/manual/en/function.mail.php
Example 4. Sending complex email.
 
doesn't work because:
$headers .= "bcc: birthdaycheck@php.net, birthdaygifts@php.net\n"; // BCCs to

contains a trailing \n (last thing in the header may not contain a \n)

under the example stand:
"Note: Make sure you have no new-line (or other whitespace) after your to or subject parameters, as this may cause strange results. "

This is very unclear, as i, have been poundering for a while what the f*ck the problem was :)

Greetings,
Alain

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-19 03:34 UTC] goba@php.net
Hey, hey, this is a documentation problem!!!!!!!!
 [2001-07-21 18:10 UTC] andy@php.net
TODO: Change documentation to remove the last \n on the
"bcc:" header
 [2001-07-22 05:33 UTC] goba@php.net
Done.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Jun 27 22:00:01 2026 UTC