#23507 [Opn->Fbk]: extra newlines in mail header
ID: 23507
Updated by: edink@php.net
Reported By: matpoc at lenta dot ru
-Status: Open
+Status: Feedback
Bug Type: Mail related
Operating System: FreeBSD 4.7-RELEASE-p4
PHP Version: 4.3.2RC2
New Comment:
Assuming that you put your 1 line script in file called test.php could
you please post the result of the following command:
/path/to/cli/php -d sendmail_path=/bin/cat test.php | xxd
Previous Comments:
------------------------------------------------------------------------
[2003-05-07 00:44:52] matpoc at lenta dot ru
The script is simple (I changed my real domain to domain.tld):
<? mail("site@domain.tld","Site new
user","NEWUSERNAME","Content-Type:text/html; charset=koi8-r"); ?>
PHP 4.3.1 make this mail:
---------------------------------------------------
From - Wed May 07 13:10:22 2003
Return-path: <www@domain.tld>
Envelope-to: site@domain.tld
Delivery-date: Wed, 07 May 2003 13:10:14 +0800
Received: from www by mail.domain.tld with local (Exim 3.36 #1)
id 19DHC2-0006UR-00
for site@domain.tld; Wed, 07 May 2003 13:10:14 +0800
To: site@domain.tld
Subject: Site new user
Content-Type:text/html; charset=koi8-r
Message-Id: <E19DHC2-0006UR-00@mail.domain.tld>
From: World Wide Web Owner <www@domain.tld>
Date: Wed, 07 May 2003 13:10:14 +0800
NEWUSERNAME
.
---------------------------------------------------
PHP 4.3.2RC2
---------------------------------------------------
From - Wed May 07 13:12:33 2003
Return-path: <www@domain.tld>
Envelope-to: site@domain.tld
Delivery-date: Wed, 07 May 2003 13:12:12 +0800
Received: from www by mail.domain.tld with local (Exim 3.36 #1)
id 19DHDw-0006X3-00
for site@domain.tld; Wed, 07 May 2003 13:12:12 +0800
To: site@domain.tld
Subject: Site new user
Content-Type:text/html; charset=koi8-r
Message-Id: <E19DHDw-0006X3-00@mail.domain.tld>
From: World Wide Web Owner <www@domain.tld>
Date: Wed, 07 May 2003 13:12:12 +0800
NEWUSERNAME
.
---------------------------------------------------
------------------------------------------------------------------------
[2003-05-06 23:34:54] wez@php.net
We can read RFCs too... but what we really want is a short
self-contained script that reproduces the problem (which is why we
directed you to the how-to-report page).
We don't want an edited version of the script and the results, because
we have no way to be sure that we are seing the same results as you.
------------------------------------------------------------------------
[2003-05-06 23:03:15] matpoc at lenta dot ru
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.
------------------------------------------------------------------------
[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?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/23507
--
Edit this bug report at http://bugs.php.net/?id=23507&edit=1
Thread (8 messages)