fix: message_from_bytes really dislikes newline at the beginning of a mail

pull/792/head
Raphaël Vinot 2021-09-30 11:10:14 +02:00
parent 85ac1b0e6a
commit 54d38df6dc
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class EMailObject(AbstractMISPObjectGenerator):
def parse_email(self) -> EmailMessage:
"""Convert email into EmailMessage."""
content_in_bytes = self.__pseudofile.getvalue()
content_in_bytes = self.__pseudofile.getvalue().strip()
eml = message_from_bytes(content_in_bytes,
_class=EmailMessage,
policy=policy.default)