From dffcaa59db930408b9f07a300ba67a7933d2eab0 Mon Sep 17 00:00:00 2001 From: thomascube Date: Thu, 20 May 2010 21:47:19 +0000 Subject: [PATCH] No need for the padding since quoted lines are not wrapped at all --- program/steps/mail/func.inc | 2 +- program/steps/mail/sendmail.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index fcb0229df..e44f3db81 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1176,7 +1176,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null) function rcmail_wrap_and_quote($text, $length = 72) { // Rebuild the message body with a maximum of $max chars, while keeping quoted message. - $max = min(78, $length + 8); + $max = min(77, $length + 8); $lines = preg_split('/\r?\n/', trim($text)); $out = ''; diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 774119dcd..2576a66b5 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -448,7 +448,7 @@ else { if (empty($_SESSION['compose']['reply_msgid']) && ($flowed = $RCMAIL->config->get('send_format_flowed', true))) $message_body = rcube_message::format_flowed($message_body, $LINE_LENGTH); else - $message_body = rc_wordwrap($message_body, min(79, $LINE_LENGTH + 8), "\r\n"); // +8: be generous with quoted lines + $message_body = rc_wordwrap($message_body, $LINE_LENGTH, "\r\n"); $message_body = wordwrap($message_body, 998, "\r\n", true); if (!strlen($message_body)) {