mb_send_mail() appends an extra MIME-Version header
| Bug #52681 | mb_send_mail() appends an extra MIME-Version header | ||||
|---|---|---|---|---|---|
| Submitted: | 2010-08-24 00:15 UTC | Modified: | 2010-08-25 08:07 UTC | ||
| From: | puhv at hot dot ee | Assigned: | aharvey (profile) | ||
| Status: | Closed | Package: | mbstring related | ||
| PHP Version: | 5.3.3 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2010-08-24 00:15 UTC] 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)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2010-08-25 07:50 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
[2010-08-25 08:07 UTC] aharvey@php.net