diff options
author | thomascube <thomas@roundcube.net> | 2007-08-30 07:50:01 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2007-08-30 07:50:01 +0000 |
commit | 63f9d3c0a5800b57131308b29ceaf33f233ec7f0 (patch) | |
tree | 58e48c9831b90c74c14587a8c099e9ac1c291b93 /program | |
parent | 3014548e3e3424f75d212a9183372bfac3a529ac (diff) |
Don't add message footer when saving as draft
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/sendmail.inc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 929f3ed3f..7a87d2e91 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -220,16 +220,8 @@ if (!empty($CONFIG['useragent'])) $message_body = get_input_value('_message', RCUBE_INPUT_POST, TRUE, $message_charset); // append generic footer to all messages -if (!empty($CONFIG['generic_message_footer'])) - { - $file = realpath($CONFIG['generic_message_footer']); - if($fp = fopen($file, 'r')) - { - $content = fread($fp, filesize($file)); - fclose($fp); - $message_body .= "\r\n" . rcube_charset_convert($content, 'UTF-8', $message_charset); - } - } +if (!$savedraft && !empty($CONFIG['generic_message_footer']) && ($footer = file_get_contents(realpath($CONFIG['generic_message_footer'])))) + $message_body .= "\r\n" . rcube_charset_convert($footer, 'UTF-8', $message_charset); // try to autodetect operating system and use the correct line endings // use the configured delimiter for headers |