Skip to content
Snippets Groups Projects
service.py 486 B
class NotificationService:
    """This is a nopaque notifcation service object."""

    def __init__(self, smtp):
        # Bool to show if the mail server stoped sending mails due to exceeding
        # its sending limit
        self.mail_limit_exceeded = False
        # Holds due to an error unsent email notifications
        self.not_sent = {}
        self.smtp = smtp

    def send(self, email):
        self.smtp.send_message(email)

    def quit(self):
        self.smtp.quit()