msg_size fixed

This commit is contained in:
Dominik Chilla 2018-12-23 11:55:35 +01:00
parent 1e35dfef7a
commit 6c0b07aa08

View File

@ -83,7 +83,8 @@ class Gulag:
uris = {} uris = {}
uid = unseen['imap_uid'] uid = unseen['imap_uid']
msg = email.message_from_bytes(unseen['msg']) msg = email.message_from_bytes(unseen['msg'])
msg_size = len(msg) # msg_size = len(msg)
msg_size = len(msg.as_string())
r5321_from = email.header.decode_header(msg['Return-Path'])[0][0] r5321_from = email.header.decode_header(msg['Return-Path'])[0][0]
if(r5321_from is not '<>'): if(r5321_from is not '<>'):
r5321_from = r5321_from.replace("<","") r5321_from = r5321_from.replace("<","")