ID: 40095 Updated by: [EMAIL PROTECTED] Reported By: indrek dot kriisa at gmail dot com -Status: Open +Status: Bogus Bug Type: Mail related Operating System: Linux PHP Version: 4.4.4 New Comment:
Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. . Previous Comments: ------------------------------------------------------------------------ [2007-01-10 19:08:44] indrek dot kriisa at gmail dot com function send_mail($to, $subject, $message, $customheaders = '') { $headers = "MIME-Version: 1.0\r\n". "Content-Type: text/html; charset=ISO-8859-1;\r\n". "Content-Transfer-Encoding: 8bit\r\n". $customheaders; return mail($to, $subject, $message, $headers); } ------------------------------------------------------------------------ [2007-01-10 19:06:26] indrek dot kriisa at gmail dot com Description: ------------ If I send mail with >1 custom header it will be not delivered or is with corrupted header (extra \r\n after last header). If only 1 header line or no header - everything works mail function gives no error No difference when using "\n" or "\r\n" Reproduce code: --------------- $customheaders = 'X-Priority: 1 (Highest)'. "\r\n"; $customheaders .= 'X-MSMail-Priority: Highest'. "\r\n"; send_mail($to, $subject, $message, $customheaders); Mail don't deliver: MIME-Version: 1.0 Content-Type: text/html; charset=ISO-8859-1; Content-Transfer-Encoding: 8bit X-Priority: 1 (Highest) X-MSMail-Priority: Highest Mail delivers: MIME-Version: 1.0 Content-Type: text/html; charset=ISO-8859-1; Content-Transfer-Encoding: 8bit X-MSMail-Priority: Highest Expected result: ---------------- delivered email with added headers Actual result: -------------- extra linebreak (\r\n) between custom headers or mail is not delivered ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40095&edit=1