|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-07 06:55 UTC] joce at presence-pc dot com
Hi,
With the following script :
<?
$headers_html = "MIME-Version: 1.0\n";
$headers_html .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
$headers_html .= "From: Presence PC - Lettre express <serveur@presence-pc.com>\n";
$headers_html .= "Return-Path: serveur@presence-pc.com\n";
mail('joc@presence-pc.com', 'test', 'test', $headers_html);
?>
Using PHP-4.3.2RC1, all works just fine and I'm receiving :
'test'
Using PHP-4.3.2RC2, header infos are no longer rightly interpreted, and I'm receiving a mail containing :
'MIME-Version: 1.0
Content-Type: text/html; charset="iso-8859-1"
From: Presence PC - Lettre express <serveur@presence-pc.com>
test'
(ie only Return-Path header info is interpreted)
Regards,
Jocelyn Fournier
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 23:00:01 2025 UTC |
This bug (or a variant of it) still seems to exist (current in version 4.3.6 build May 26 2004). My experiments have show that if I add a 'MIME-Version: 1.0' header then PHP adds an extra carriage return newline after it. This code (taken from Wordpress) reproduces the problem: $message_headers = "MIME-Version: 1.0\r\n" . "$from\r\n" . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n"; @mail($user->user_email, $subject, $notify_message, $message_headers); There is an extra blank line after the MIME-Version header. If you replace the MIME-Version header with "Reply-To: fred\r\n" you do NOT get an extra blank line. If you replace it with "X-Hello: world\r\n" then again you do get the blank line. It appears to be related to whether the header in question is a 'well known' header???