diff --git a/eml_parser/parser.py b/eml_parser/parser.py index 871ff1b..011b2b9 100644 --- a/eml_parser/parser.py +++ b/eml_parser/parser.py @@ -892,7 +892,7 @@ def get_raw_body_text(self, msg: email.message.Message, boundary: typing.Optiona # pylint: disable=too-many-boolean-expressions if ( ('content-disposition' not in msg and msg.get_content_maintype() == 'text') - or (filename.endswith('.html') or filename.endswith('.htm')) + or (filename.endswith(('.html', '.htm'))) or ('content-disposition' in msg and msg.get_content_disposition() == 'inline' and msg.get_content_maintype() == 'text') ): encoding = msg.get('content-transfer-encoding', '').lower()