From: php dot net at chris dot cs278 dot org Operating system: Various PHP version: 5.2.10 PHP Bug Type: Mail related Bug description: Unable to properly fold To/Subject in emails
Description: ------------ The SKIP_LONG_HEADER_SEP macro only permits CR-LF-WSP as a separator which works fine for SMTP, but sendmail under NIX requires LF as the new line character. The macro doesn't skip over LF-WSP which causes the LF to be replaced with a space, unfolding the header. This makes it near impossible to use UTF-8/etc. encoded strings for these headers. I posted to internals about this problem: http://marc.info/?l=php-internals&m=125110373328523&w=2 Reproduce code: --------------- mail('[email protected]', "Reproduction test e-mail for PHP bug breaking the correct wrapping\n of e-mails with long To/Subject headers.", 'Testing...'); Expected result: ---------------- To: [email protected] Subject: Reproduction test e-mail for PHP bug breaking the correct wrapping of e-mails with long To/Subject headers. Testing... Actual result: -------------- To: [email protected] Subject: Reproduction test e-mail for PHP bug breaking the correct wrapping of e-mails with long To/Subject headers. Testing... -- Edit bug report at http://bugs.php.net/?id=49355&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49355&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49355&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49355&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49355&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49355&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49355&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49355&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49355&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49355&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49355&r=support Expected behavior: http://bugs.php.net/fix.php?id=49355&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49355&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49355&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49355&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49355&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49355&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49355&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49355&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49355&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49355&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49355&r=mysqlcfg
