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()