#23507 [Fbk->Opn]: extra newlines in mail header
| From: | matpoc at lenta dot ru | Date: | Wed, 07 May 2003 04:03:16 +0000 |
| Subject: | #23507 [Fbk->Opn]: extra newlines in mail header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39197@lists.php.net to get a copy of this message | ||
ID: 23507
User updated by: matpoc at lenta dot ru
Reported By: matpoc at lenta dot ru
-Status: Feedback
+Status: Open
Bug Type: Mail related
Operating System: FreeBSD 4.7-RELEASE-p4
PHP Version: 4.3.2RC2
New Comment:
RFC2822 "Internet Message Format"
ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt
says:
A message consists of header fields (collectively called "the header
of the message") followed, optionally, by a body. The header is a
sequence of lines of characters with special syntax as defined in
this standard. The body is simply a sequence of characters that
follows the header and is separated from the header by an empty line
(i.e., a line with nothing preceding the CRLF).
So, in my example all lines after "To: site@domain.tld" line
interpreted as message body. Therefor mail programm can't see other
headers and can't understand it's Subject, charset, etc.
BTW, mail function works correctly in PHP 4.3.1, and after upgrade to
4.3.2RC2 mail finctionality was broken. So, I downgraded to PHP 4.3.1.
Previous Comments:
------------------------------------------------------------------------
[2003-05-06 17:43:35] wez@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2003-05-06 17:34:28] nicos@php.net
Do you really think that it's a problem?
Anything in the RFC saying that it's bad?
------------------------------------------------------------------------
[2003-05-06 10:30:11] matpoc at lenta dot ru
add extra newlines in mail header.
Example:
mail("site@domain.tld","Site new user",$id_user,"Content-Type:
text/html; charset=koi8-r");
result (without some unnecessary headers):
---------------------------------------------------
Received: from www by mail.domain.tld with local (Exim 3.36 #1)
id 19D0fH-000HcK-00
for site@domain.tld; Tue, 06 May 2003 19:31:19 +0800
To: site@domain.tld
Subject: Site new user
Content-Type: text/html; charset=koi8-r
Message-Id: <E19D0fH-000HcK-00@mail.domain.tld>
From: World Wide Web Owner <www@domain.tld>
Date: Tue, 06 May 2003 19:31:19 +0800
NEWUSERNAME
---------------------------------------------------
PHP compiled with gd2, freetype, jpeg, png, zlib, mysql modules.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23507&edit=1