|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-05-02 10:33 UTC] [email protected]
[2017-05-02 10:33 UTC] [email protected]
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Mar 17 11:00:01 2026 UTC |
Description: ------------ In win32/sendmail.c:SendText the code that examines headers looks for CC and BCC for special treatment. CC is anchored to the beginning of a line but BCC is not. If there is an X-*bcc header then it will be recognized as a BCC line and 1. PHP will attempt to RCPT TO the header's value 2. The "X-*" will be merged with the next line (if any) when the header is stripped away. Fix is to tack on a copy of CC's && ((pos1 == headers_lc) || (*(pos1-1) == '\n')) to that one pos1 condition. Test script: --------------- $headers = implode("\r\n", [ "Cc: [email protected]", "X-Test-Cc: line 2", "X-Test-Aabbcc: line 3", "X-Line-4: line 4" ]); mail("[email protected]", "Subject", "Body", $headers); Expected result: ---------------- Recipients: [email protected], [email protected] Cc: [email protected] X-Test-Cc: line 2 X-Test-Aabbcc: line 3 X-Line-4: line 4 Actual result: -------------- Recipients: [email protected], [email protected], line 3 Cc: [email protected] X-Test-Cc: line 2 X-Test-AabX-Line-4: line 4