php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68829 mail(): \r\n is for windows only
Submitted: 2015-01-13 23:31 UTC Modified: 2015-01-14 00:02 UTC
From: phpnet at revmaps dot no-ip dot org Assigned:
Status: Duplicate Package: Documentation problem
PHP Version: 5.6.4 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
39 + 34 = ?
Subscribe to this entry?

 
 [2015-01-13 23:31 UTC] phpnet at revmaps dot no-ip dot org
Description:
------------
---
From manual page: http://www.php.net/function.mail
---
manual says:
>  Each line should be separated with a CRLF (\r\n). Lines should not be larger
>  than 70 characters. 

which is completly wrong.

\r\n is not applicable to posix platforms. on linux it should be \n
else the generated SMTP message gets \r doubled 


70 character limit is for encoded MIME content only. RFC5322 allows 998 cahacters per line in non-MIME content but reccomends 78 as the limit.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-14 00:02 UTC] aharvey@php.net
-Status: Open +Status: Duplicate
 [2015-01-14 00:02 UTC] aharvey@php.net
This has previously been discussed multiple times, and we believe that the current documentation is correct: see bug #63416 for a (lengthy) back and forth.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 05:01:30 2024 UTC