Index: branches/5.1.x/core/units/helpers/email_message_helper.php =================================================================== diff -u -r13151 -r13276 --- branches/5.1.x/core/units/helpers/email_message_helper.php (.../email_message_helper.php) (revision 13151) +++ branches/5.1.x/core/units/helpers/email_message_helper.php (.../email_message_helper.php) (revision 13276) @@ -12,9 +12,9 @@ { $ret = Array ('Subject' => '', 'Headers' => '', 'Body' => ''); $headers = Array(); - $lines = explode("\n", $text); + $lines = explode("\n", $text); // "\n" is lost in process - foreach ($lines as $line) { + foreach ($lines as $line_id => $line) { if (strlen(trim($line)) == 0 || ($line == '.')) { break; } @@ -30,12 +30,10 @@ $ret['Headers'] = implode("\n", $headers); - $message_body = ''; - while ((list($line_id, $line) = each($lines))) { - $message_body .= $line; - } + $lines = array_slice($lines, $line_id + 1); - $ret['Body'] = $message_body; + // add "\n", that was lost before + $ret['Body'] = implode("\n", $lines); return $ret; }