diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-05-13 18:25:52 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-05-13 18:25:52 +0000 |
| commit | ed477bef291fe76bb52e14a71599e38557f93e27 (patch) | |
| tree | 7e6850b402a480f48002b48154a33552e7787576 | |
| parent | d2cf2d2fcfcc81fdc30fac0e11310e9916a93e79 (diff) | |
Wrap message body text (closes #1484148)
git-svn-id: https://svn.roundcube.net/trunk@556 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/sendmail.inc | 18 |
2 files changed, 12 insertions, 7 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 66dab0e8a..1a2d5e759 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -6,6 +6,7 @@ CHANGELOG RoundCube Webmail - Updated Norwegian (bokmal), Czech, Danish and Portuguese (standard) translation - Fixed marking as read in preview pane (closes #1484364) - CSS hack to display attachments correctly in IE6 +- Wrap message body text (closes #1484148) 2007/05/03 (yllar) diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index bc454b309..37b57e20e 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/program/steps/mail/sendmail.inc @@ -258,7 +258,7 @@ if ($isHtml) // add a plain text version of the e-mail as an alternative part. $h2t = new html2text($message_body); - $plainTextPart = $h2t->get_text(); + $plainTextPart = wordwrap($h2t->get_text(), 998, "\r\n", true); $MAIL_MIME->setTXTBody($plainTextPart); // look for "emoticon" images from TinyMCE and copy into message as attachments @@ -266,6 +266,8 @@ if ($isHtml) } else { + $message_body = wordwrap($message_body, 75, "\r\n"); + $message_body = wordwrap($message_body, 998, "\r\n", true); $MAIL_MIME->setTXTBody($message_body, FALSE, TRUE); } @@ -286,12 +288,14 @@ $charset_7bit = array('ASCII', 'ISO-2022-JP', 'ISO-8859-1', 'ISO-8859-2', 'ISO-8 $transfer_encoding = in_array(strtoupper($message_charset), $charset_7bit) ? '7bit' : '8bit'; // encoding settings for mail composing -$message_param = array('text_encoding' => $transfer_encoding, - 'html_encoding' => 'quoted-printable', - 'head_encoding' => 'quoted-printable', - 'head_charset' => $message_charset, - 'html_charset' => $message_charset, - 'text_charset' => $message_charset); +$message_param = array( + 'text_encoding' => $transfer_encoding, + 'html_encoding' => 'quoted-printable', + 'head_encoding' => 'quoted-printable', + 'head_charset' => $message_charset, + 'html_charset' => $message_charset, + 'text_charset' => $message_charset, +); // compose message body and get headers $msg_body = $MAIL_MIME->get($message_param); |
