nopaque/daemon/notify/service.py

17 lines
486 B
Python
Raw Normal View History

class NotificationService:
2020-06-05 12:42:04 +00:00
"""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
2020-06-05 12:42:04 +00:00
def send(self, email):
self.smtp.send_message(email)
2020-06-05 12:42:04 +00:00
def quit(self):
self.smtp.quit()