Bug #52681 [Asn->Csd]: mb_send_mail() appends an extra MIME-Version header
Edit report at http://bugs.php.net/bug.php?id=52681&edit=1
ID: 52681
Updated by: aharvey@php.net
Reported by: puhv at hot dot ee
Summary: mb_send_mail() appends an extra MIME-Version header
-Status: Assigned
+Status: Closed
Type: Bug
Package: mbstring related
Operating System: Linux
PHP Version: 5.3.3
Assigned To: aharvey
Block user comment: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2010-08-25 08:07:24] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=302758
Log: Fixed bug #52681 (mb_send_mail() appends an extra MIME-Version
header).
------------------------------------------------------------------------
[2010-08-24 00:15:00] puhv at hot dot ee
Description:
------------
Specifying a MIME-Version header when using mb_send_mail() results in
such a header appearing twice in the e-mail message.
Also note that RFC2045 spells the initialism MIME in upper case and
requires the text "MIME-Version: 1.0" to be verbatim (although ignoring
RFC822 comment strings is required), see
http://tools.ietf.org/html/rfc2045#section-4
Test script:
---------------
<?php
$headers = 'From: Someone <someone@somewhere.invalid>' . "\n"
. 'MIME-Version: 1.0' . "\n"
. 'Content-Type: text/plain; charset=UTF-8' . "\n"
. 'Content-Transfer-Encoding: 8bit';
mb_send_mail('john@smith.invalid', 'Test', 'Testing', $headers);
?>
Expected result:
----------------
E-mail message with the following headers:
To: john@smith.invalid
Subject: Test
From: Someone <someone@somewhere.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <20100823191234.ABCDEF1234@host.domain.invalid>
Date: Mon, 23 Aug 2010 22:12:34 +0300 (EEST)
Actual result:
--------------
E-mail message has the following headers:
To: john@smith.invalid
Subject: Test
From: Someone <someone@somewhere.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mime-Version: 1.0
Message-Id: <20100823191234.ABCDEF1234@host.domain.invalid>
Date: Mon, 23 Aug 2010 22:12:34 +0300 (EEST)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52681&edit=1
Thread (3 messages)