joys of unicode... cleaned up unread message header data

workspace
Brendan Howell 8 years ago
parent 487994b633
commit 79f15e9246

@ -269,15 +269,15 @@ class MailRoom(Bureau):
for msgid, data in resp.items(): for msgid, data in resp.items():
msg = {} msg = {}
env = data["ENVELOPE"] env = data[b"ENVELOPE"]
msg["msgid"] = str(msgid) msg["msgid"] = str(msgid)
sender = env.from_[0] sender = env.from_[0]
msg["fromaddr"] = sender.mailbox + "@" + sender.host msg["fromaddr"] = str(sender.mailbox) + "@" + str(sender.host)
msg["fromname"] = sender.name msg["fromname"] = str(sender.name)
msg["date"] = data["INTERNALDATE"] msg["date"] = str(data[b"INTERNALDATE"])
msg["size"] = data["RFC822.SIZE"] msg["size"] = str(data[b"RFC822.SIZE"])
msg["subject"] = env.subject msg["subject"] = str(env.subject)
msgs.append(msg) msgs.append(msg)

Loading…
Cancel
Save