From e713b5c82fffe837b5c7344385373a513a8542f9 Mon Sep 17 00:00:00 2001 From: Manuel Gomez <34234948+lologf@users.noreply.github.com> Date: Fri, 24 May 2019 12:36:19 +0200 Subject: [PATCH] Update models.py --- django_mailbox/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 0508f36..156fd66 100644 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -385,7 +385,7 @@ class Mailbox(models.Model): # Fix to accept subject emojis in utf-8 if 'subject' in message: msg.subject = ( - utils.convert_header_to_unicode(message['subject']).encode('raw-unicode-escape'))[0:255] + utils.convert_header_to_unicode(message['subject'].encode('raw-unicode-escape'))[0:255] ) msg.subject = unicode(email.header.decode_header(msg.subject)[0][0]), errors='ignore') if 'message-id' in message: