diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-12-07 09:35:29 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-12-07 09:35:29 +0000 |
| commit | 34e371d586aa6fb180cb799a541d4fdf57925df4 (patch) | |
| tree | f6b084dee9c7fad130207e51daa1f26026408720 /roundcubemail/program/steps/mail/sendmail.inc | |
| parent | 61ffc53ca0fa29e15c895de155ab9cde4c073bf8 (diff) | |
- Add option to set default font for HTML message (#1484137)
git-svn-id: https://svn.roundcube.net/trunk@5562 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/sendmail.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/sendmail.inc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index 0da1ee342..6e124f98f 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/program/steps/mail/sendmail.inc @@ -397,6 +397,15 @@ $isHtml = (bool) get_input_value('_is_html', RCUBE_INPUT_POST); // fetch message body $message_body = get_input_value('_message', RCUBE_INPUT_POST, TRUE, $message_charset); +if ($isHtml) { + $font = rcube_fontdefs($RCMAIL->config->get('default_font', 'Verdana')); + $bstyle = $font && is_string($font) ? " style='font-family: $font'" : ''; + + // append doctype and html/body wrappers + $message_body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">' . + "\r\n<html><body$bstyle>\r\n" . $message_body; +} + if (!$savedraft) { if ($isHtml) { // remove signature's div ID @@ -406,10 +415,6 @@ if (!$savedraft) { $bstyle = 'padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%'; $message_body = preg_replace('/<blockquote>/', '<blockquote type="cite" style="'.$bstyle.'">', $message_body); - - // append doctype and html/body wrappers - $message_body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">' . - "\r\n<html><body>\r\n" . $message_body; } // Check spelling before send @@ -443,8 +448,10 @@ if (!$savedraft) { if ($footer) $message_body .= "\r\n" . $footer; - if ($isHtml) - $message_body .= "\r\n</body></html>\r\n"; +} + +if ($isHtml) { + $message_body .= "\r\n</body></html>\r\n"; } // set line length for body wrapping |
