Code Comments
Programming Forum and web based access to our favorite programming groups.ID: 25373 Updated by: mez@php.net Reported By: shane at sell dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: linux PHP Version: 4.3.3 New Comment: This has now been changed to: Note: You must use \r\n to separate headers, although some Unix mail transfer agents replace \n by \r\n automatically (leads to doubling \r if \r\n is used). Which should be sufficent documentation on this issue. Previous Comments: ------------------------------------------------------------------------ [2004-07-02 17:49:57] curt@php.net All Command should issue <CRLF>, According to rfc821 4.1.1 and rfc2821 2.3.7. sendmail might be taking care of the actual translations, but either way, its probably a bad idea to send mixed line endings in the smtp commands. ------------------------------------------------------------------------ [2004-07-02 13:37:21] vrana@php.net AFAIK \r\n has to be on Windows, \n on Unix (even it may work sometimes with \r\n as explained by "jhaar at trimble dot co dot nz"). I don't know what's correct on Mac. I wish to change this in php-src to work same on all platforms rather than documenting it. ------------------------------------------------------------------------ [2004-07-02 13:23:45] php at grandrath-net dot de I experienced the very same issue with exim. Replacing '\r\n' with '\n' and removing any linebreak from the last header-line did the trick. Please update your documentation. THX! Martin Grandrath ------------------------------------------------------------------------ [2004-04-08 05:23:16] Jon at cytekstudios dot com Ive also had that issue, because the manual indicates to use \r\n. I just removed the \r and everything worked fine. Maybe we could just change the manual entry to only have the \n's? Does using only \n's create problems with other mailers or OS's? I've only tested on linux with qmail. Thanks, Jonathan CytekStudios.com ------------------------------------------------------------------------ [2004-03-09 02:53:48] jhaar at trimble dot co dot nz This reference to <CR><LF> is causing grief. That is a reference to the SMTP RFCs - not "how to write text to a command-line mailer like /usr/sbin/sendmail". As mail() calls the command-line program, it should refer to EOL as being "<LF>" only. It so happens that sendmail converts <CR><LF> it sees in text into <LF> before processing it any further - but that was a wee sendmail-specific feature - not an official standard. e.g. Qmail has a "sendmail clone" /usr/sbin/sendmail - and it *doesn't* do that. Then you end up with e-mail going out with <CR><CR><LF> within the SMTP transaction - yuck! Thanks Jason ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25373 -- Edit this bug report at http://bugs.php.net/?id=25373&edit=1
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.