php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55216 Bug in PHPmail
Submitted: 2011-07-15 15:49 UTC Modified: 2011-07-18 22:29 UTC
From: seinghhaccoski at rocketmail dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.2.17 OS: Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: seinghhaccoski at rocketmail dot com
New email:
PHP Version: OS:

 

 [2011-07-15 15:49 UTC] seinghhaccoski at rocketmail dot com
Description:
------------
Email that shows headers 

Test script:
---------------
//some $_POST['email'] validations 
$to = $_POST['email'];
$subject = 'Ordinazione Patronum.tk';
$headers = 'From: patronum.tk@patronum.tk' . "\r\n";
$headers .=    'Reply-To: patronum.tk@patronum.tk' . "\r\n" .
'X-Mailer: PHP/' . phpversion(). "\r\n".
"MIME-Version: 1.0\r\n".
"Content-Type: text/html; charset=\"iso-8859-1\"\r\n".
"Content-Transfer-Encoding: 7bit\n\n";
mail($to, $subject, $messaggio, $headers);

Expected result:
----------------
I want the email headers to don't appear in the email content

Actual result:
--------------
A mail with the headers in the content:
example:
Reply-To: Patronum.tk@patronum.tk

X-Mailer: PHP/5.2.6-1+lenny9

MIME-Version: 1.0

Content-Type: text/html; charset="iso-8859-1"

Content-Transfer-Encoding: 7bit
Message-Id: <20110715192326.C5B9C77230D@patronum.tk>
Date: Fri, 15 Jul 2011 21:23:26 +0200 (CEST)
La sua ordinazione &egrave; stata completata con successo. <br>Totale: 100

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-18 22:29 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2011-07-18 22:29 UTC] aharvey@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

As documented on the mail() manual page, your MTA is (a bad) one that expects only 
\n to separate headers, not \r\n.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC