summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-12-26 12:14:34 +0100
committerAleksander Machniak <alec@alec.pl>2012-12-26 12:14:34 +0100
commit66afd70b756a0637da3537e96f6bf6ce0a2c46e9 (patch)
tree97d57798ee3c4cd9ebca62f24f90d05f806cffda /program/steps/mail
parent7ac94421bf85eb04c00c5ed05390e1ea0c6bcb0b (diff)
Framework'ize html2text class
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/compose.inc4
-rw-r--r--program/steps/mail/func.inc2
-rw-r--r--program/steps/mail/sendmail.inc2
3 files changed, 4 insertions, 4 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index d07cf587f..379e920e5 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -470,7 +470,7 @@ function rcmail_compose_header_from($attrib)
$text = $html = $sql_arr['signature'];
if ($sql_arr['html_signature']) {
- $h2t = new html2text($sql_arr['signature'], false, false);
+ $h2t = new rcube_html2text($sql_arr['signature'], false, false);
$text = trim($h2t->get_text());
}
else {
@@ -667,7 +667,7 @@ function rcmail_compose_part_body($part, $isHtml = false)
// use html part if it has been used for message (pre)viewing
// decrease line length for quoting
$len = $compose_mode == RCUBE_COMPOSE_REPLY ? $LINE_LENGTH-2 : $LINE_LENGTH;
- $txt = new html2text($body, false, true, $len);
+ $txt = new rcube_html2text($body, false, true, $len);
$body = $txt->get_text();
}
else if ($part->ctype_secondary == 'enriched') {
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 90f54cf1b..814adb64d 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -704,7 +704,7 @@ function rcmail_print_body($part, $p = array())
// convert html to text/plain
if ($data['type'] == 'html' && $data['plain']) {
- $txt = new html2text($data['body'], false, true);
+ $txt = new rcube_html2text($data['body'], false, true);
$body = $txt->get_text();
$part->ctype_secondary = 'plain';
}
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 36d850f8f..eb0ba89c6 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -559,7 +559,7 @@ if ($isHtml) {
$plugin['body'] = rcmail_replace_emoticons($plugin['body']);
// add a plain text version of the e-mail as an alternative part.
- $h2t = new html2text($plugin['body'], false, true, 0, $message_charset);
+ $h2t = new rcube_html2text($plugin['body'], false, true, 0, $message_charset);
$plainTextPart = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n", false, $message_charset);
$plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true);