#25254 [Bgs->Opn]: Using /r/n in mailheaders causes mailbody to become currupt
| From: | ts at dreamcoder dot dk | Date: | Tue, 07 Oct 2003 16:03:39 +0000 |
| Subject: | #25254 [Bgs->Opn]: Using /r/n in mailheaders causes mailbody to become currupt | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-48656@lists.php.net to get a copy of this message | ||
ID: 25254
User updated by: ts at dreamcoder dot dk
Reported By: ts at dreamcoder dot dk
-Status: Bogus
+Status: Open
Bug Type: Mail related
Operating System: Linux
PHP Version: 4.3.3
New Comment:
I'm opening this again.
It could be a major regression, could you please look further into
this, sniper?
If anything related to mail() has been changed since 4.3.2?
Previous Comments:
------------------------------------------------------------------------
[2003-10-07 11:58:08] info at frekk dot de
We've faced the same issue:
Linux blizzard 2.4.22
PHP 4.3.3
http://www.support-panel.de/modules/newbb/viewtopic.php?topic_id=2445&forum=10
(sorry, is german)
worked perfectly under 4.3.2
------------------------------------------------------------------------
[2003-08-27 01:13:50] ts at dreamcoder dot dk
It's still an issue in terms of BC.
As I mentioned, it worked fine in 4.3.2
------------------------------------------------------------------------
[2003-08-26 23:50:45] sniper@php.net
Either using \r\n or just \n works just fine for me.
Not PHP bug.
------------------------------------------------------------------------
[2003-08-26 11:59:33] ts at dreamcoder dot dk
Description:
------------
When running the attached code, the mail headers will not be sent
correctly
This results in the mailheaders becomming corrupt and send two
linebreaks, thus dumping the remaining headers to the mail body. Notice
how two Message-Id's and Date headers are sent with the mail
The attached code worked fine in PHP 4.3.2. But also works when using
\n instead of \r\n
Reproduce code:
---------------
<?php
echo mail("example@example.com", "Test Mail", "Hello",
"From: John <test@example.com>\r\n"
."X-Engine: This\r\n"
."X-Mailer: PHP/" . phpversion());
?>
Expected result:
----------------
Headers:
From: John <test@example.com>
X-Engine: This
X-Mailer: PHP/4.3.3
Message-Id: <20030826164802.3A2B314152@mail.example.com>
Date: Tue, 26 Aug 2003 18:48:02 +0200 (CEST)
Hello
Actual result:
--------------
Headers:
From: John <test@example.com>
X-Engine: This
Message-ID: <1061916489.17277@example.com>
Date: Tue, 26 Aug 2003 18:48:09 +0200
X-Mailer: PHP/4.3.3
Message-Id: <20030826164802.3A2B314152@mail.example.com>
Date: Tue, 26 Aug 2003 18:48:02 +0200 (CEST)
Hello
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25254&edit=1