The problem is in the mail_quotedprintable_encode() function of inc/mail.php.
Patch is reproduced below and attached to the bug report.
Thanks,
--Joe
--- mail.php.orig 2006-06-14 16:47:03.000000000 -0400
+++ mail.php 2006-09-05 11:15:10.000000000 -0400
@@ -162,6 +162,11 @@ function mail_quotedprintable_encode($sT
// split text into lines
$aLines= preg_split("/(?:\r\n|\r|\n)/", $sText);
+ // determine proper line ending
+ if ( strtoupper(substr(PHP_OS,0,3)) == 'WIN' ) { $eol = "\r\n"; }
+ elseif ( strtoupper(substr(PHP_OS,0,3)) == 'MAC' ) { $eol = "\r"; }
+ else { $eol = "\n"; }
+
for ($i=0;$i<count($aLines);$i++) {
$sLine =& $aLines[$i];
if (strlen($sLine)===0) continue; // do nothing, if empty
@@ -210,12 +215,12 @@ function mail_quotedprintable_encode($sT
// but this wouldn't be caught by such an easy RegExp
if($maxlen){
preg_match_all( '/.{1,'.($maxlen - 2).'}([^=]{0,2})?/', $sLine, $aMatch );
- $sLine = implode( '=' . chr(13).chr(10), $aMatch[0] ); // add soft crlf's
+ $sLine = implode( '=' . $eol, $aMatch[0] ); // add soft crlf's
}
}
// join lines into text
- return implode(chr(13).chr(10),$aLines);
+ return implode($eol, $aLines);
}