summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-08-07 04:35:17 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-08-07 04:35:17 -0400
commit5d3d864484a8b6b70561d65c92567c5c42435bba (patch)
tree9fc6e0f760d72730503cd8f7b55237550ddd0b0d
parentcb869efb70ca1a7b792d2981e95baaa1beaef330 (diff)
downloadaskbot-5d3d864484a8b6b70561d65c92567c5c42435bba.tar.gz
askbot-5d3d864484a8b6b70561d65c92567c5c42435bba.tar.bz2
askbot-5d3d864484a8b6b70561d65c92567c5c42435bba.zip
added one more quote regex for outlook
-rw-r--r--askbot/mail/lamson_handlers.py4
-rw-r--r--askbot/mail/parsing.py13
2 files changed, 17 insertions, 0 deletions
diff --git a/askbot/mail/lamson_handlers.py b/askbot/mail/lamson_handlers.py
index 812e5a28..dd21b8c9 100644
--- a/askbot/mail/lamson_handlers.py
+++ b/askbot/mail/lamson_handlers.py
@@ -332,6 +332,10 @@ def PROCESS(
}
template = get_template('email/re_welcome_lamson_on.html')
+ if DEBUG_EMAIL:
+ msg = u'Sending welcome mail to %s\n' % from_address
+ sys.stderr.write(msg.encode('utf-8'))
+
mail.send_mail(
subject_line = _('Re: %s') % subject_line,
body_text = template.render(Context(data)),#todo: set lang
diff --git a/askbot/mail/parsing.py b/askbot/mail/parsing.py
index 91111f3b..9857252e 100644
--- a/askbot/mail/parsing.py
+++ b/askbot/mail/parsing.py
@@ -21,6 +21,19 @@ KMAIL_QUOTE_RE = r'\AOn [^\n]+ you wrote:\s*\n\n'
OUTLOOK_RTF_QUOTE_RE = r'\nSubject: [^\n]+\nFrom: [^\n]+\nTo: [^\n]+\nDate: [^\n]+\Z'
OUTLOOK_TEXT_QUOTE_RE = r'\n_+\Z'
+OUTLOOK1_QUOTE_RE = r'\n-+Original Message-+\nFrom:.*\nSent:.*\nTo:.*Subject\n'
+
+# extra samples
+"""
+-----Original Message-----^M
+From: forum@example.com [mailto:forum@example.com] ^M
+Sent: Wednesday, August 07, 2013 11:00 AM^M
+To: Jane Doe^M
+Subject: "One more test question from email."^M
+
+"""
+
+
def compile_quote_regexes():
regex_names = filter(
lambda v: v.endswith('_QUOTE_RE'),