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: <snip>
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.
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php