convert to string

This commit is contained in:
Antonio J. Delgado 2024-09-28 20:26:41 +03:00
parent ab56c33c27
commit a9faa5a3c2

View file

@ -135,7 +135,7 @@ class ImapFilter:
try:
part = data[1].decode('utf-8')
except UnicodeDecodeError:
part = data[1]
part = str(data[1])
message = email.message_from_string(part)
decoded_field = email.header.decode_header(message.get(mfilter['field'], ""))
if isinstance(decoded_field[0][0], str):