Bug #73507 [NEW]: Extra space added before additional headers when mail.add_x_header is enabled
| From: | mattcoz at yahoo dot com | Date: | Sat, 12 Nov 2016 18:10:59 +0000 |
| Subject: | Bug #73507 [NEW]: Extra space added before additional headers when mail.add_x_header is enabled | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-205326@lists.php.net to get a copy of this message | ||
From: mattcoz at yahoo dot com
Operating system: Windows
PHP version: 7.0.13
Package: *Mail Related
Bug Type: Bug
Bug description:Extra space added before additional headers when mail.add_x_header is enabled
Description:
------------
When the server is set up with the mail.add_x_header preference enabled,
an extra space is added before the additional headers. In my example
where I set the From address in my additional headers, this causes it to
add an additional From header. The email is then blocked if sent to
gmail addresses. This does not happen on another server running PHP
5.3.13 with the same settings.
I've attempted to look at the mail.c code and find the problem, but I
don't see anywhere that might explain why the extra space is being
added.
Test script:
---------------
mail("to@email.com", "Subject", "Message", "From:
from@email.com");
Expected result:
----------------
To: <to@email.com>
X-PHP-Originating-Script: 0:test.php
From: <from@email.com>
Actual result:
--------------
To: <to@email.com>
X-PHP-Originating-Script: 0:test.php
From: from@email.com
From: <from@email.com>
--
Edit bug report at https://bugs.php.net/bug.php?id=73507&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73507&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73507&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73507&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73507&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73507&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73507&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73507&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73507&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73507&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73507&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73507&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73507&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73507&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73507&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73507&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73507&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73507&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73507&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73507&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73507&r=mysqlcfg