From 8d7c8dfe63c027bcc5037eb918ac141c5e2effc9 Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Thu, 17 Dec 2020 08:20:59 -0600 Subject: [PATCH] enable sending to multiple e-mail addresses, comma separated. --- api1.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api1.py b/api1.py index dc81ecc..007e1ae 100644 --- a/api1.py +++ b/api1.py @@ -41,7 +41,8 @@ def expiryCheck(): cursor = db.cursor() for theRow in cursor.execute("select expiry,topic,email from entries where active=True and isNotified=False and expiry < datetime()"): print(theRow) - sendMail(theRow[1],theRow[2]) + for theEmailAddr in theRow[2].split(','): + sendMail(theRow[1],theEmailAddr) db.execute("update entries set isNotified=True where topic=?",[theRow[1]]) db.commit() db.close()