Merge pull request #999 from simple-login/ac-allow-7-bit-encoding

Allow '7-bit' encoding for Content-Transfer-Encoding
This commit is contained in:
Adrià Casajús 2022-05-18 15:01:34 +02:00 committed by GitHub
commit e37689dc58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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":