#23507 [Fbk->Csd]: extra newlines in mail header

From: Date: Wed, 07 May 2003 20:38:17 +0000
Subject: #23507 [Fbk->Csd]: extra newlines in mail header
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39246@lists.php.net to get a copy of this message
 ID:               23507
 Updated by:       edink@php.net
 Reported By:      matpoc at lenta dot ru
-Status:           Feedback
+Status:           Closed
 Bug Type:         Mail related
 Operating System: FreeBSD 4.7-RELEASE-p4
 PHP Version:      4.3.2RC2
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2003-05-07 03:37:42] edink@php.net

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


------------------------------------------------------------------------

[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.




------------------------------------------------------------------------

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)

« previous php.bugs (#39246) next »