handle plain text email replies and format

This commit is contained in:
robert schouten 2017-02-20 14:31:17 +08:00
parent 1071d4321d
commit e39c87757b

View file

@ -326,7 +326,7 @@ class Email:
if self.html_content:
self.content, self.content_type = self.html_content, 'text/html'
else:
self.content, self.content_type = EmailReplyParser.parse_reply(self.text_content), 'text/plain'
self.content, self.content_type = EmailReplyParser.read(self.text_content).text.replace("\n","\n\n"), 'text/plain'
def process_part(self, part):
"""Parse email `part` and set it to `text_content`, `html_content` or `attachments`."""