Doc #52850 [NEW]: The documentation is not clear enough

From: Date: Wed, 15 Sep 2010 09:30:20 +0000
Subject: Doc #52850 [NEW]: The documentation is not clear enough
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5045@lists.php.net to get a copy of this message
From: Operating system: Linux PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:The documentation is not clear enough Description: ------------ In the documentation to the mail function the handling of the chars \r and \n are misleading. The explanation from Ben Cooke in the comments is very clear. Link to the comment: http://de.php.net/manual/en/function.mail.php#59773 It would be great to find the explanation in the doc directly. Which would help others to find this information faster. Here is the comment: Note that there is a big difference between the behavior of this function on Windows systems vs. UNIX systems. On Windows it delivers directly to an SMTP server, while on a UNIX system it uses a local command to hand off to the system's own MTA. The upshot of all this is that on a Windows system your message and headers must use the standard line endings \r\n as prescribed by the email specs. On a UNIX system the MTA's "sendmail" interface assumes that recieved data will use UNIX line endings and will turn any \n to \r\n, so you must supply only \n to mail() on a UNIX system to avoid the MTA hypercorrecting to \r\r\n. If you use plain old \n on a Windows system, some MTAs will get a little upset. qmail in particular will refuse outright to accept any message that has a lonely \n without an accompanying \r. -- Edit bug report at http://bugs.php.net/bug.php?id=52850&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52850&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52850&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52850&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52850&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52850&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52850&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52850&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52850&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52850&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52850&r=support Expected behavior: http://bugs.php.net/fix.php?id=52850&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52850&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52850&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52850&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52850&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52850&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52850&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52850&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52850&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52850&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52850&r=mysqlcfg

« previous php.doc.bugs (#5045) next »