From 940fc136b59a63f4f42ff5a649a59af7863f7f8c Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Fri, 29 Aug 2008 09:19:36 -0400 Subject: [PATCH] #1485297: remove signature's div ID from sent html message --- program/steps/mail/sendmail.inc | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index a1b25ab..1eb9389 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -221,15 +221,19 @@ 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()); -- Gitblit v1.9.1