summaryrefslogtreecommitdiffstats
path: root/askbot/mail
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-09-28 15:29:05 -0600
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-09-28 15:29:18 -0600
commitc10f919d6c98898316d993a9ebe6d583c2425e64 (patch)
tree10198d7049d63e9ef8fd1192000c0890d76ae39f /askbot/mail
parent48fdfe22e96f3279124462b5a490abdc981e695d (diff)
downloadaskbot-c10f919d6c98898316d993a9ebe6d583c2425e64.tar.gz
askbot-c10f919d6c98898316d993a9ebe6d583c2425e64.tar.bz2
askbot-c10f919d6c98898316d993a9ebe6d583c2425e64.zip
fixes logging body of email
Diffstat (limited to 'askbot/mail')
-rw-r--r--askbot/mail/lamson_handlers.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/askbot/mail/lamson_handlers.py b/askbot/mail/lamson_handlers.py
index e3251ee1..3c937014 100644
--- a/askbot/mail/lamson_handlers.py
+++ b/askbot/mail/lamson_handlers.py
@@ -11,9 +11,6 @@ from askbot import mail
from askbot.conf import settings as askbot_settings
from askbot.skins.loaders import get_template
-import logging
-
-
#we might end up needing to use something like this
#to distinguish the reply text from the quoted original message
"""
@@ -130,8 +127,6 @@ def process_reply(func):
in the case of error, send a bounce email
"""
- logging.info("logged-message: %s", message.split('\n')[:5])
-
try:
for rule in django_settings.LAMSON_FORWARD:
if re.match(rule['pattern'], message.base['to']):
@@ -151,10 +146,17 @@ def process_reply(func):
)
#here is the business part of this function
+ parts = get_parts(message),
+ for part_type, content in parts:
+ if part_type == 'body':
+ print 'message :', content.split('\n')[:10]
+ break
+ else:
+ continue
func(
from_address = message.From,
subject_line = message['Subject'],
- parts = get_parts(message),
+ parts = parts,
reply_address_object = reply_address
)