def __init__(self, cmd_id, sender, recipients, email, data): Notification.__init__(self) self.title = "@CMD: %s" % (cmd_id) self.sender = sender self.recipients = recipients self.body["text"] = self.__get_body(email, data.raw)
def __init__(self, sender, recipients, command, sprops): Notification.__init__(self) if "subject" in sprops: self.title = sprops["subject"] else: self.title = "Re: " + command.id if "reply-to" in sprops: recipients.append(sprops["reply-to"]) self.recipients = recipients self.sender = sender self.body = command.output