summaryrefslogtreecommitdiffstats
path: root/askbot/mail
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-09-18 09:03:01 -0600
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-09-18 09:03:01 -0600
commit715aea125ab7a9c0686929395f36d54f6434a899 (patch)
treea58e979ad06a1073da4d72f72f85604dc5fcb694 /askbot/mail
parent1766d1741969d51e1ebe76765c3a68939f29999e (diff)
downloadaskbot-715aea125ab7a9c0686929395f36d54f6434a899.tar.gz
askbot-715aea125ab7a9c0686929395f36d54f6434a899.tar.bz2
askbot-715aea125ab7a9c0686929395f36d54f6434a899.zip
buggy commit, error parsing signature from html emails
Diffstat (limited to 'askbot/mail')
-rw-r--r--askbot/mail/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/askbot/mail/__init__.py b/askbot/mail/__init__.py
index 739b147e..2629aa47 100644
--- a/askbot/mail/__init__.py
+++ b/askbot/mail/__init__.py
@@ -158,8 +158,8 @@ def mail_moderators(
try:
msg = mail.EmailMessage(
- subject_line,
- body_text,
+ subject_line,
+ body_text,
from_email,
recipient_list,
headers = headers or {}
@@ -287,10 +287,13 @@ def process_attachment(attachment):
def extract_user_signature(text, reply_code):
"""extracts email signature as text trailing
the reply code"""
- if reply_code in text:
+ #FIXME: buggy in html code
+ striped_text = clean_html_email(text.replace('<br>', '\n'))
+ #striped_text = strip_tags(text.replace('<br>', '\n'))
+ if reply_code in striped_text:
#extract the signature
tail = list()
- for line in reversed(text.splitlines()):
+ for line in reversed(striped_text.splitlines()):
#scan backwards from the end until the magic line
if reply_code in line:
break