| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2005-08-03 14:08 UTC] tony2001@php.net
  [2005-08-03 16:21 UTC] dominik dot blystak at pro-open dot de
  [2005-08-03 16:22 UTC] dominik dot blystak at pro-open dot de
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 15:00:01 2025 UTC | 
Description: ------------ In php 4.3.10 and 4.3.4 of Mandrake Linux I encountered the following behaviour. The mail() function sets a second mime-header with Content-Type: text/plain; charset=UTF-8 and Content-Transfer-Encoding: BASE64 regardless of an already provided header. I could verify this problem with example code of the mail() documentation. Reproduce code: --------------- <?php $to = "dominik.blystak@pro-open.de"; // beachten Sie das Komma $subject = "Geburtstags-Erinnerung f?r August"; $message = ' <html> <head> <title>Geburtstags-Erinnerung f?r August</title> </head> <body> <p>Hier sind die Geburtstage im August!</p> </body> </html> '; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "Content-Transfer-Encoding: quoted-printable\r\n"; mail($to, $subject, $message, $headers); ?> Expected result: ---------------- There is just one mime-header (reduced to relevant parts): To: my@mail.com Subject: Geburtstags-Erinnerung f?r August MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-Id: <20050803115921.B21BF9DCE6@server.com> Date: Wed, 3 Aug 2005 13:59:21 +0200 (CEST) From: apache@server.com (system user for apache) X-Length: 1114 X-KMail-EncryptionState: X-KMail-SignatureState: X-KMail-MDN-Sent: X-UID: 1135 Status: RO X-Status: OC <html> <head> <title>Geburtstags-Erinnerung f?r August</title> </head> <body> <p>Hier sind die Geburtstage im August!</p> </body> </html> Actual result: -------------- There are two mime-headers (reduced to relevant parts): To: my@mail.com Subject: Geburtstags-Erinnerung =?UTF-8?B?ZsO8ciBBdWd1?= =?UTF-8?B?c3Q=?= MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: BASE64 Message-Id: <20050803115702.836366BC021@server.com> Date: Wed, 3 Aug 2005 13:57:02 +0200 (CEST) From: apache@server.com (system user for apache) X-UID: 39490 X-Length: 1211 Status: R X-Status: NC X-KMail-EncryptionState: X-KMail-SignatureState: X-KMail-MDN-Sent: Cgk8aHRtbD4KCTxoZWFkPgoJIDx0aXRsZT5HZWJ1cnRzdGFncy1FcmlubmVydW5nIGbDvHIgQXVn dXN0PC90aXRsZT4KCSA8L2hlYWQ+CgkgPGJvZHk+CgkgPHA+SGllciBzaW5kIGRpZSBHZWJ1cnRz dGFnZSBpbSBBdWd1c3QhPC9wPgoJCSAgICAgPC9ib2R5PgoJCSAgICAgPC9odG1sPgoJCSAgICAg