def message(self):
        """ Read mail, parse it and return a Message instance. """
        logger.debug("Parsing mail at {} ...".format(self.path))
        with open(self.path, 'rb') as mail_file:
            if PY2:
                message = email.message_from_file(mail_file)
            else:
                message = email.message_from_binary_file(mail_file)
        return message
def message ( self ) : logger . debug ( "Parsing mail at {} ..." . format ( self . path ) ) with open ( self . path , 'rb' ) as mail_file : if PY2 : message = email . message_from_file ( mail_file ) else : message = email . message_from_binary_file ( mail_file ) return message
Read mail, parse it and return a Message instance.