refactor notify.py
This commit is contained in:
parent
64945637e0
commit
95ebc44f05
|
@ -24,6 +24,10 @@ mail_from = "ulricqin@163.com"
|
||||||
class Sender(object):
|
class Sender(object):
|
||||||
@classmethod
|
@classmethod
|
||||||
def send_email(cls, payload):
|
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")
|
users = payload.get('event').get("notify_users_obj")
|
||||||
|
|
||||||
emails = {}
|
emails = {}
|
||||||
|
|
|
@ -24,6 +24,10 @@ mail_from = "ulricqin@163.com"
|
||||||
class Sender(object):
|
class Sender(object):
|
||||||
@classmethod
|
@classmethod
|
||||||
def send_email(cls, payload):
|
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")
|
users = payload.get('event').get("notify_users_obj")
|
||||||
|
|
||||||
emails = {}
|
emails = {}
|
||||||
|
|
Loading…
Reference in New Issue