Bug #51604 [Com]: newline in end of header is shown in start of message
| From: | pavol at klacansky dot com | Date: | Mon, 19 Apr 2010 18:50:47 +0000 |
| Subject: | Bug #51604 [Com]: newline in end of header is shown in start of message | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-149703@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51604&edit=1
ID: 51604
Comment by: pavol at klacansky dot com
Reported by: pavol at klacansky dot com
Summary: newline in end of header is shown in start of message
Status: Open
Type: Bug
Package: Mail related
Operating System: Ubuntu
PHP Version: 5.3.2
New Comment:
Actual result:
--------------
\nHallo
Previous Comments:
------------------------------------------------------------------------
[2010-04-19 20:49:55] pavol at klacansky dot com
Description:
------------
if I have a newline (\n) at the end of last header, it will show to
start of message of mail
Test script:
---------------
<?php
$email = 'ufo@ufo.net';
$headers = 'From: ' . $email . "\n";
$headers .= 'Cc: ' . $email . "\n";
$headers .= 'X-Mailer: PHP/' . phpversion() . "\n";
$headers .= 'Content-Type: text/plain; charset=utf-8' . "\n";
$headers .= 'Content-Transfer-Encoding: 8bit' . "\n";
mail('test@test.tt', 'test', 'Hallo', $headers);
?>
Expected result:
----------------
Hallo
Actual result:
--------------
Hallo
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51604&edit=1