Bug #52681 [Opn->Asn]: mb_send_mail() appends an extra MIME-Version header
| From: | aharvey@php.net | Date: | Wed, 25 Aug 2010 05:50:29 +0000 |
| Subject: | Bug #52681 [Opn->Asn]: mb_send_mail() appends an extra MIME-Version header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153771@lists.php.net to get a copy of this message | ||
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: Open
+Status: Assigned
Type: Bug
Package: mbstring related
Operating System: Linux
PHP Version: 5.3.3
-Assigned To:
+Assigned To: aharvey
Block user comment: N
Previous Comments:
------------------------------------------------------------------------
[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