enable sending to multiple e-mail addresses, comma separated.

This commit is contained in:
Joe Tretter
2020-12-17 08:20:59 -06:00
parent a8651d77fc
commit 8d7c8dfe63

View File

@@ -41,7 +41,8 @@ def expiryCheck():
cursor = db.cursor() cursor = db.cursor()
for theRow in cursor.execute("select expiry,topic,email from entries where active=True and isNotified=False and expiry < datetime()"): for theRow in cursor.execute("select expiry,topic,email from entries where active=True and isNotified=False and expiry < datetime()"):
print(theRow) 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.execute("update entries set isNotified=True where topic=?",[theRow[1]])
db.commit() db.commit()
db.close() db.close()