|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80706 mail(): Headers after Bcc headers may be ignored
Submitted: 2021-02-03 20:09 UTC Modified: 2021-02-04 14:35 UTC
From: josh at dirxion dot com Assigned: cmb (profile)
Status: Closed Package: Mail related
PHP Version: 7.4.14 OS: Windows
Private report: No CVE-ID: None
 [2021-02-03 20:09 UTC] josh at dirxion dot com
I suspect bug ID 72964 may be related to this issue. 

With the release of PHP 7.4.14 we are experiencing an issue with our web email forms being processed. It seems to mangle the HTML formatting when there is only one email address. I have verified the problem does not exists in version 7.4.13 and that if I provide multiple addresses the mangled HTML email content problem goes away. 

7.4.14 email example

7.4.13 email example

Test script:
'Bcc: '. $VariableEmailGroup . "\r\n" .

If we add on a 2nd email address to the same syntax, the HTML formatting of the email is preserved properly. The problem is we don't want to list out multiple email addresses. 

'Bcc: ' . $VariableEmailGroup . ", \r\n\\r\n" .

I will update with more details of what the variable value is once I receive an internal response. 


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-03 20:12 UTC]
-Status: Open +Status: Feedback
 [2021-02-03 20:12 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

 [2021-02-03 22:05 UTC]
-Status: Feedback +Status: Open -Assigned To: +Assigned To: cmb
 [2021-02-03 22:05 UTC]
Thanks for filing as new ticket!  I'll have a closer look
tomorrow.  A reproduce script may not be necessary.
 [2021-02-04 14:35 UTC]
-Summary: HTML Emails Mangled with only one recipient +Summary: mail(): Headers after Bcc headers may be ignored -Status: Assigned +Status: Verified -Operating System: Windows 2016 Std +Operating System: Windows
 [2021-02-04 14:35 UTC]
The problem is that headers after Bcc headers may be ignored.

Indeed, that regression has been introduced with the fix for bug
 [2021-02-04 16:47 UTC]
The following pull request has been associated:

Patch Name: Fix #80706: mail(): Headers after Bcc headers may be ignored
On GitHub:
 [2021-02-08 17:45 UTC]
Automatic comment on behalf of
Log: Fix #80706: mail(): Headers after Bcc headers may be ignored
 [2021-02-08 17:45 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 03:01:29 2024 UTC