Bug #7629 Updated: Mail() fails when the email message has a "\n"
| From: | mfischer@php.net | Date: | Sat, 08 Jun 2002 14:17:12 +0000 |
| Subject: | Bug #7629 Updated: Mail() fails when the email message has a "\n" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9849@lists.php.net to get a copy of this message | ||
ID: 7629
Updated by: mfischer@php.net
Reported By: smiglio@newtek.com
-Status: Assigned
+Status: Closed
Bug Type: Feature/Change Request
Operating System: W2000 Server
PHP Version: 4.0.3pl1
Assigned To: hholzgra
New Comment:
This is fixed now in CVS, the snapshot at
http://snaps.php.net/win32/php4-win32-latest.zip
already contains the
code which doesn't care anymore whether it's \r or \n or \r\n or \n\r
in the $header, it converts it appropriately.
I haven't head yet complains about problems with \n in the $body. If
so, please open a new bug report (but not if you haven't yet tested the
snapshot :-)
Previous Comments:
------------------------------------------------------------------------
[2001-08-12 15:26:10] sebastian@php.net
tested on Win2K Pro using PHP-4.0.6: sending mail works with \n
------------------------------------------------------------------------
[2001-01-09 14:19:52] vlad@php.net
Are you sure it should be a feature request, and not closed? I remember
reading that \r\n is the *only* valid line ending, at least for
headers, and something similar for body... (looked it up - RFC822
Section 3.2, also 3.1.4, and others. 3.3 implies that a single LF
should *not* be used, as far as I can interpret)
If some servers accept \n by itself, they do not seem to be
RFC-compliant, do we really want to change the way mail() works to
support non-compliant servers, or should we just put it in the
documentation, and make people use \r\n instead?
------------------------------------------------------------------------
[2001-01-09 07:59:22] hholzgra@php.net
SMTP defines line ending as CR LF (\r\n)
also some SMTP servers will also accept LF (\n)
the SMTP code for mail() on windows should
take care of this ...
moved to feature requests
------------------------------------------------------------------------
[2001-01-09 07:46:48] cynic@php.net
you have to use \r\n in messages mail()ed from win32 systems. I don't
know whether this can be considered as the correct behavior.
------------------------------------------------------------------------
[2000-11-03 17:16:12] smiglio@newtek.com
Works under Linux but not under W2000 Server.
Function : Mail()
When i put a \n in the email message, the mail() function fails.
if i send the same email without any \n it's working.
I only have this problem under Windows 2000 server
(i never try under W98 or another microsoft OS)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=7629&edit=1