summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-29 13:19:36 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-29 13:19:36 +0000
commit879d6e16aca1367ca40c0bfcdc2d7fba51ecb7ac (patch)
treed981689c08b2ab8514bdd0316a2dc7f153abe0ab /roundcubemail/program/steps/mail/sendmail.inc
parent4380ee37eb506200a798de5b22f0c5e2d721de9e (diff)
#1485297: remove signature's div ID from sent html message
git-svn-id: https://svn.roundcube.net/trunk@1700 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/sendmail.inc')
-rw-r--r--roundcubemail/program/steps/mail/sendmail.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc
index a1b25ab43..1eb9389da 100644
--- a/roundcubemail/program/steps/mail/sendmail.inc
+++ b/roundcubemail/program/steps/mail/sendmail.inc
@@ -221,16 +221,20 @@ $headers['X-Sender'] = $from;
if (!empty($CONFIG['useragent']))
$headers['User-Agent'] = $CONFIG['useragent'];
+$isHtmlVal = strtolower(get_input_value('_is_html', RCUBE_INPUT_POST));
+$isHtml = ($isHtmlVal == "1");
+
// fetch message body
$message_body = get_input_value('_message', RCUBE_INPUT_POST, TRUE, $message_charset);
+// remove signature's div ID
+if (!$savedraft && $isHtml)
+ $message_body = preg_replace('/\s*id="_rc_sig"/', '', $message_body);
+
// append generic footer to all messages
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);
-$isHtmlVal = strtolower(get_input_value('_is_html', RCUBE_INPUT_POST));
-$isHtml = ($isHtmlVal == "1");
-
// create extended PEAR::Mail_mime instance
$MAIL_MIME = new rcube_mail_mime($RCMAIL->config->header_delimiter());