#41297 [Opn->Bgs]: bcc line not fully parsed if it contains \r\n

From: Date: Sat, 05 May 2007 14:55:25 +0000
Subject: #41297 [Opn->Bgs]: bcc line not fully parsed if it contains \r\n
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112292@lists.php.net to get a copy of this message
ID: 41297 Updated by: iliaa@php.net Reported By: mattyrobuk at googlemail dot com -Status: Open +Status: Bogus Bug Type: Mail related Operating System: All PHP Version: 5.2.2 New Comment: 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 You need to take out the space in front on the Bcc header. Previous Comments: ------------------------------------------------------------------------ [2007-05-05 14:51:23] mattyrobuk at googlemail dot com Description: ------------ RFC 822 and RFC2822 demand that the bcc header line is not more than 998 characters long but allows for inclusion of folding whitespace (\r\n). Including \r\n in the BCC header causes additional email addresses in the BCC header to be ignored by the mail() function. Reproduce code: --------------- $to = 'to@domain.com'; $subject = 'Test message'; $body = 'Test message.'; $headers = 'From: Administrator <admin@prescriber.org.uk>' . "\r\n"; $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'bcc: bcc1@domain.com,\r\n bcc2@domain.com' . "\r\n"; Expected result: ---------------- Email should be sent to to@domain.com and BCC'd to bcc1@domain.com AND bcc2@domain.com. Actual result: -------------- Email is sent to to@domain.com and BCC'd to bcc1@domain.com bcc2@domain.com never gets the email. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41297&edit=1

« previous php.bugs (#112292) next »