[PHP-DEV] PHP 4.0 Bug #7629 Updated: Mail() fails when the email message has a "\n" From: vlad <email protected>
Date: 01/09/01

ID: 7629
Updated by: vlad
Reported By: smiglio <email protected>
Status: Assigned
Bug Type: Feature/Change Request
Assigned To: hholzgra
Comments:

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?

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

[2001-01-09 07:59:22] hholzgra <email protected>
SMTP defines line ending as CR LF (rn)
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 <email protected>
you have to use rn 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 <email protected>
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)

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

Full Bug description available at: http://bugs.php.net/?id=7629

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>