enable sending to multiple e-mail addresses, comma separated.
This commit is contained in:
3
api1.py
3
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()
|
||||
|
||||
Reference in New Issue
Block a user