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
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: 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: Thu Jun 18 15:00:01 2026 UTC