Bug #7629 Updated: Mail() fails when the email message has a "\n"

From: Date: Sun, 12 Aug 2001 19:26:10 +0000
Subject: Bug #7629 Updated: Mail() fails when the email message has a "\n"
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63009@lists.php.net to get a copy of this message
ID: 7629 Updated by: sebastian Reported By: smiglio@newtek.com Status: Assigned Bug Type: Feature/Change Request Operating System: W2000 Server PHP Version: 4.0.3pl1 Assigned To: hholzgra New Comment: tested on Win2K Pro using PHP-4.0.6: sending mail works with \n Previous Comments: ------------------------------------------------------------------------ [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

« previous php.dev (#63009) next »