From 3a40f0c61c8596b2672d252935bf730f15817836 Mon Sep 17 00:00:00 2001 From: Jack Li <61096708+Jackiebibili@users.noreply.github.com> Date: Wed, 26 Oct 2022 17:38:18 -0500 Subject: [PATCH] Hot fix mailer Merge pull request #21 from Jackiebibili/hot-fix --- apps/pushnotification/smtp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/pushnotification/smtp.py b/apps/pushnotification/smtp.py index 3578339..0115a41 100644 --- a/apps/pushnotification/smtp.py +++ b/apps/pushnotification/smtp.py @@ -25,9 +25,10 @@ def server_send_email(server: SMTP_SSL, receiver_emails: list[str], message: str def send_email(receiver_emails: list[str], messages: list[str]): + global server if len(messages) == 0: return - # print(messages[0]) + # print(receiver_emails, messages[0]) try: err = server_send_email(server, receiver_emails, messages[0]) if err is not None: