From 88c60f5387166e0bc27f526e9d83e2be403b0891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Wed, 18 May 2022 09:56:30 +0200 Subject: [PATCH] Allow '7-bit' encoding for Content-Transfer-Encoding --- app/email_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/email_utils.py b/app/email_utils.py index 0c65df43..ef7baa87 100644 --- a/app/email_utils.py +++ b/app/email_utils.py @@ -885,7 +885,7 @@ def get_encoding(msg: Message) -> EmailEncoding: - 7bit: default if unknown or empty """ cte = str(msg.get(headers.CONTENT_TRANSFER_ENCODING, "")).lower().strip() - if cte in ("", "7bit", "8bit", "binary", "8bit;", "utf-8"): + if cte in ("", "7bit", "7-bit", "8bit", "binary", "8bit;", "utf-8"): return EmailEncoding.NO if cte == "base64":