refactor notify.py

This commit is contained in:
Ulric Qin 2021-12-14 21:39:01 +08:00
parent 64945637e0
commit 95ebc44f05
2 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,10 @@ mail_from = "ulricqin@163.com"
class Sender(object):
@classmethod
def send_email(cls, payload):
if mail_user == "ulricqin" and mail_pass == "password":
print("invalid smtp configuration")
return
users = payload.get('event').get("notify_users_obj")
emails = {}

View File

@ -24,6 +24,10 @@ mail_from = "ulricqin@163.com"
class Sender(object):
@classmethod
def send_email(cls, payload):
if mail_user == "ulricqin" and mail_pass == "password":
print("invalid smtp configuration")
return
users = payload.get('event').get("notify_users_obj")
emails = {}