#22962 [Csd]: mail-function uses only \n to seperate fields To & Subject
| From: | pollita@php.net | Date: | Tue, 06 May 2003 23:59:30 +0000 |
| Subject: | #22962 [Csd]: mail-function uses only \n to seperate fields To & Subject | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39193@lists.php.net to get a copy of this message | ||
ID: 22962
Updated by: pollita@php.net
Reported By: uroeder at gmx dot net
Status: Closed
Bug Type: Mail related
Operating System: Linux
PHP Version: 4.3.1
New Comment:
Pasting some headers (or entire message content) would be a big plus.
The fix applied here should not adversely affect Outlook, but it's
worth some investigation.
Previous Comments:
------------------------------------------------------------------------
[2003-05-06 16:28:01] om at insign dot ch
Hi,
can it be that the bug you fixed last month
( http://bugs.php.net/bug.php?id=22962 ) broke
something in
the mail() command ?
We have a kind of CMS (www.icms.ch) with a mailclass which sends
mails with attachments: with php 4.3.1 it works fine, with 4.3.2rc2
it "looks" fine too, but outlook users can't read the mail
anymore: pretty wired... (no changes others than php version)
I'll make some more tries tomorrow, but maybe you will have
an idea before :)
Regards from Switzerland,
Olivier
------------------------------------------------------------------------
[2003-04-01 00:28:07] pollita@php.net
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.
Fixed (partially) in CVS.
The \n characters surrounding the message body have been left as \n
only while \n characters in headers have been expanded to \r\n. This
is because of tests with multiple MTAs showing inconsistent behavior
which is best left as is.
------------------------------------------------------------------------
[2003-03-30 08:48:26] uroeder at gmx dot net
The php-Manual suggests "... You must use \r\n to seperate headers,
...", but when you take a look at ext/standard/mail.c the To- and
Subject-field given as arguments to the php-mail-function are seperated
by using ONLY newline (\n). Maybe sendmail corrects this mistake
automatically, but I'm using postfix and when I try to send mail some
of my additional headers (which are all correctly seperated by \r\n)
appear in the message-body.
Fixing this bug is easy, just edit ext/standard/mail.c lines 199-204
(fprintf(sendmail, ...)) and replace \n with \r\n.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22962&edit=1