Commit 10248174 authored by Imran Hussain's avatar Imran Hussain
Browse files

Be more verbose about sending reminder emails

parent ac80965f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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 ###