note 100193 added to function.mail

From: Date: Thu, 30 Sep 2010 08:07:20 +0000
Subject: note 100193 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-172836@lists.php.net to get a copy of this message
We had a LAMP setting with postfix as mail system. Our additional headers were not interpreted correctly by a receiving mailserver (Exchange/ENOD32) and a newline was inserted after the first additional header. It turns out that a internet/dos style newline (\r\n) in the headers were converted to \r\r\n (ie: something mindlessly replaced all \n with \r\n without seeing if \n was already preceded by \r) I don't know if this is something in PHP or postfix, but seeing the comments below I suspect it is something of PHP on *NIX in combination with non-sendmail mailers. So, use your 'local' newline style for additional headers, as opposed to the examples above. I don't know if this is a bug anywhere. I don't know which element exactly does the unix2dos translation. If it is PHP, it should only replace ([^\r])\n with \1\r\n ---- Server IP: 213.249.64.162 Probable Submitter: 85.145.66.8 ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- https://master.php.net/note/edit/100193 Del: integrated -- https://master.php.net/note/delete/100193/integrated Del: useless -- https://master.php.net/note/delete/100193/useless Del: bad code -- https://master.php.net/note/delete/100193/bad+code Del: spam -- https://master.php.net/note/delete/100193/spam Del: non-english -- https://master.php.net/note/delete/100193/non-english Del: in docs -- https://master.php.net/note/delete/100193/in+docs Del: other reasons-- https://master.php.net/note/delete/100193 Reject -- https://master.php.net/note/reject/100193 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172836) next »