Commit 58b9e693 authored by Romain Bignon's avatar Romain Bignon

fix encoding of sender name in the email's From field

parent 16318dcb
......@@ -117,7 +117,7 @@ class Monboob(ConsoleApplication):
if mail.get_reply_id():
reply_id = u'<%s.%s@%s>' % (, mail.get_full_reply_id(), domain)
subject = mail.get_title()
sender = u'%s <%s@%s>' % (mail.get_from(),, domain)
sender = u'"%s" <%s@%s>' % (mail.get_from().replace('"', '""'),, domain)
# assume that get_date() returns an UTC datetime
date = time.strftime('%a, %d %b %Y %H:%M:%S +0000', mail.get_date().timetuple())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment