diff --git a/src/aiomail/extract.py b/src/aiomail/extract.py index 4744aee..2fc7abc 100644 --- a/src/aiomail/extract.py +++ b/src/aiomail/extract.py @@ -57,7 +57,7 @@ def _decode_part(part: email.message.Message) -> Optional[str]: charset = part.get_content_charset() or "utf-8" try: return payload.decode(charset, errors="replace") - except (LookupError, TypeError): + except (LookupError, TypeError, ValueError): return payload.decode("utf-8", errors="replace")