@classmethod<EOL><INDENT>def from_EmailMessage(cls, message):<DEDENT>
mail = cls(<EOL>from_email=Email(message.get('<STR_LIT>')),<EOL>subject=message.get('<STR_LIT>'),<EOL>to_emails=Email(message.get('<STR_LIT>')),<EOL>)<EOL>try:<EOL><INDENT>body = message.get_content()<EOL><DEDENT>except AttributeError:<EOL><INDENT>body = message.get_payload()<EOL><DEDENT>mail.add_content(Content(<EOL>message.get_content_type(),<EOL>body.strip()<EOL>))<EOL>for k, v in message.items():<EOL><INDENT>mail.add_header(Header(k, v))<EOL><DEDENT>return mail<EOL>
Create a Mail object from an instance of
        email.message.EmailMessage.

        :type message: email.message.EmailMessage
        :rtype: Mail