[SUCS Devel] [Git][sucs/accountmanager][master] Be more verbose about sending reminder emails

Imran Hussain imranh at sucs.org
Sun Mar 10 14:17:11 GMT 2019


Imran Hussain pushed to branch master at sucs / accountmanager


Commits:
10248174 by Imran Hussain at 2019-03-10T14:16:52Z
Be more verbose about sending reminder emails

- - - - -


1 changed file:

- sucsam.py


Changes:

=====================================
sucsam.py
=====================================
@@ -26,6 +26,7 @@ def correctPaidUntilStr():
 		sys.exit(3)
 	return "Sept. " + str(paidyear)
 
+
 # annoyingly when people have paid until is stored as a string in the DB
 # as something like "Sept. $YEAR"
 # so explode the str on " " cast $year to int and compare to correct year
@@ -89,6 +90,9 @@ def sendReminderEmail(listofpeeps):
 			smtpConn = smtplib.SMTP('localhost')
 			smtpConn.sendmail(sender, receiver, message.as_string())
 			smtpConn.quit()
+
+			print("Sent reminder email to " + username + " on" + str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")))
+
 			if debugmode > 0:  # only send out one email instead of 85464684164864165
 				sys.exit(0)
 		else:
@@ -129,6 +133,7 @@ def mainMenu():
 	else:
 		mainMenu()
 
+
 def quickStats():
 	print("There are:")
 	print(str(len(students))+" Students")
@@ -402,6 +407,7 @@ def deleteAccounts():
 
 	deleteMenu(tobedeleted)
 
+
 ### MAIN ###
 
 



View it on GitLab: https://projects.sucs.org/sucs/accountmanager/commit/102481745b89054edfc6e5cbd4be95ebc71281bc

-- 
View it on GitLab: https://projects.sucs.org/sucs/accountmanager/commit/102481745b89054edfc6e5cbd4be95ebc71281bc
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20190310/6c08acb0/attachment-0001.html>


More information about the Devel mailing list