From: Operating system: Linux PHP version: 5.3.3 Package: mbstring related Bug Type: Bug Bug description:mb_send_mail() appends an extra MIME-Version header
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 <some...@somewhere.invalid>' . "\n" . 'MIME-Version: 1.0' . "\n" . 'Content-Type: text/plain; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: 8bit'; mb_send_mail('j...@smith.invalid', 'Test', 'Testing', $headers); ?> Expected result: ---------------- E-mail message with the following headers: To: j...@smith.invalid Subject: Test From: Someone <some...@somewhere.invalid> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <20100823191234.abcdef1...@host.domain.invalid> Date: Mon, 23 Aug 2010 22:12:34 +0300 (EEST) Actual result: -------------- E-mail message has the following headers: To: j...@smith.invalid Subject: Test From: Someone <some...@somewhere.invalid> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mime-Version: 1.0 Message-Id: <20100823191234.abcdef1...@host.domain.invalid> Date: Mon, 23 Aug 2010 22:12:34 +0300 (EEST) -- Edit bug report at http://bugs.php.net/bug.php?id=52681&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52681&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52681&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52681&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52681&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52681&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52681&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52681&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52681&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52681&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52681&r=support Expected behavior: http://bugs.php.net/fix.php?id=52681&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52681&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52681&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52681&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52681&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52681&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52681&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52681&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52681&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52681&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52681&r=mysqlcfg