Bug #51604 [Com]: newline in end of header is shown in start of message

[email protected] ("pavol at klacansky dot com")
Newsgroups php.bugs
Message-ID <[email protected]>
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 = '[email protected]';
$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('[email protected]', 'test', 'Hallo', $headers);
?>

Expected result:
----------------
Hallo

Actual result:
--------------
Hallo


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51604&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.