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

Fixing header decoding such that it works properly under both Python 3.x and 2.x.

This commit is contained in:
Adam Coddington 2014-04-22 17:06:17 -07:00
parent ef42c319e9
commit a2cf80ef99
4 changed files with 18 additions and 6 deletions

View file

@ -257,7 +257,7 @@ class Mailbox(models.Model):
msg = Message()
msg.mailbox = self
if 'subject' in message:
msg.subject = convert_header_to_unicode(message['subject'][0:255])
msg.subject = convert_header_to_unicode(message['subject'])[0:255]
if 'message-id' in message:
msg.message_id = message['message-id'][0:255]
if 'from' in message: