1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Update models.py

This commit is contained in:
Manuel Gomez 2019-05-24 12:46:24 +02:00 committed by GitHub
parent e713b5c82f
commit 6136dea28f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -387,7 +387,7 @@ class Mailbox(models.Model):
msg.subject = (
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')
msg.subject = unicode(email.header.decode_header(msg.subject)[0][0], errors='ignore')
if 'message-id' in message:
msg.message_id = message['message-id'][0:255].strip()
if 'from' in message: