Bug #51604 [Opn->Asn]: newline in end of header is shown in start of message
Edit report at http://bugs.php.net/bug.php?id=51604&edit=1
ID: 51604
Updated by: aharvey@php.net
Reported by: pavol at klacansky dot com
Summary: newline in end of header is shown in start of message
-Status: Open
+Status: Assigned
Type: Bug
Package: Mail related
Operating System: Ubuntu
PHP Version: 5.3.2
-Assigned To:
+Assigned To: aharvey
Previous Comments:
------------------------------------------------------------------------
[2010-04-21 16:01:58] degeberg@php.net
The attached patch will fix this issue. I don't have php-src karma, so I
can't commit it myself.
------------------------------------------------------------------------
[2010-04-21 16:00:42] degeberg@php.net
The following patch has been added/updated:
Patch Name: php_bug51604.diff
Revision: 1271858442
URL:
http://bugs.php.net/patch-display.php?bug=51604&patch=php_bug51604.diff&revision=1271858442
------------------------------------------------------------------------
[2010-04-19 20:50:47] pavol at klacansky dot com
Actual result:
--------------
\nHallo
------------------------------------------------------------------------
[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
Thread (6 messages)