class PreviewMessage(object): """Preview message""" def __init__(self, msgfile): "init" self.parser = EmailParser(msgfile) def preview(self): "Return message" return self.parser.parse() def attachment(self, attachmentid): "Return attachment" return self.parser.get_attachment(attachmentid) def img(self, imageid): "Return inline image" return self.parser.get_img(imageid)
def __init__(self, msgfile): "init" self.parser = EmailParser(msgfile)