Permalink
Browse files

Handling case where there is no plain or html body in a received email.

  • Loading branch information...
1 parent 3998af5 commit b170d8b24684da59268c9ac91a6162200cc8b929 @benbest86 committed May 27, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 handle_weekly.py
View
@@ -10,6 +10,8 @@
class WeeklyUpdateHandler(InboundMailHandler):
def receive(self, mail_message):
sender = mail_message.sender
+ html_body = None
+ plain_body = None
for content_type, body in mail_message.bodies('text/plain'):
plain_body = body.decode()
for content_type, body in mail_message.bodies('text/html'):

0 comments on commit b170d8b

Please sign in to comment.