Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45331 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94723 invoked from network); 21 Aug 2009 20:56:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2009 20:56:38 -0000 Authentication-Results: pb1.pair.com header.from=davey@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=davey@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 207.97.245.133 as permitted sender) X-PHP-List-Original-Sender: davey@php.net X-Host-Fingerprint: 207.97.245.133 smtp133.iad.emailsrvr.com Linux 2.4/2.6 Received: from [207.97.245.133] ([207.97.245.133:53983] helo=smtp133.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/94-03363-50A0F8A4 for ; Fri, 21 Aug 2009 16:56:38 -0400 Received: from relay23.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay23.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id 3268E1B40A4; Fri, 21 Aug 2009 16:56:35 -0400 (EDT) Received: by relay23.relay.iad.mlsrvr.com (Authenticated sender: davey-AT-pixelated-dreams.com) with ESMTPSA id E90DD1B4079; Fri, 21 Aug 2009 16:56:34 -0400 (EDT) Cc: internals@lists.php.net, Chris Smith Message-ID: To: Joey Smith In-Reply-To: <20090821191145.GA9393@joeysmith.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Fri, 21 Aug 2009 16:56:33 -0400 References: <4A8EC373.8040002@chris.cs278.org> <20090821191145.GA9393@joeysmith.com> X-Mailer: Apple Mail (2.935.3) Subject: Re: [PHP-DEV] mail() and header folding/line endings From: davey@php.net (Davey Shafik) PHP_EOL is \n on OS X. So the \r worries are not a concern. PHP_EOL would be fine in this case, assuming the OSX sendmail is fine with it. - Davey On Aug 21, 2009, at 03:11 PM, Joey Smith wrote: > 3) I don't have an Apple platform for testing, what will happen on > Mac if PHP_EOL is used as the separator for $additional_headers? I > would like to change the documentation to say "Multiple extra > headers should be separated with the PHP_EOL constant", but I'm not > the least bit certain this is going to work correctly on Mac. I can > tell you that on my machines (Linux, using a mix exim and sendmail > as MTAs), it will not see the \r as a separator, but mixing \r\n and > \n within the same message works just fine (another case of the > ever-prevalent SMTP mantra of "Be permissive in what you accept, and > strict in what you send"). If PHP_EOL can't be safely used, I imagine > we'll have to document it as 'Use "\r\n" on Win32, and "\n" > everywhere else', which I'd really rather not do - it seems hackish.