From b356ea1b288e36ab629caba2ec1724617a29e2f2 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Mon, 1 Jun 2020 21:14:23 +0200 Subject: [PATCH] force convert header to string, sometimes addrs is Header object --- app/email_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/email_utils.py b/app/email_utils.py index b4e60458..63678ecb 100644 --- a/app/email_utils.py +++ b/app/email_utils.py @@ -465,6 +465,8 @@ def get_addrs_from_header(msg: Message, header) -> [str]: return ret for addrs in header_content: + # force convert header to string, sometimes addrs is Header object + addrs = str(addrs) for addr in addrs.split(","): ret.append(addr.strip())