Loading sucsam.py +16 −2 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ def sendReminderEmail(listofpeeps): smtpConn = smtplib.SMTP('localhost') smtpConn.sendmail(sender, receiver, message.as_string()) smtpConn.quit() if debugmode > 0: #only send out one email instead of 85464684164864165 sys.exit(0) else: print("Renewal email template not found!") Loading Loading @@ -169,7 +170,8 @@ def reminderMenu(): print("Double check https://sucs.org/Admin/SU that everyone that has paid to renew has been marked as renwed. This tool doesn't do that job yet!") print("") print("1. View a list of accounts that aren't marked as renewed in the DB") print("2. Semd email to all students reminding them to renew") print("2 Semd email to all reminding them to renew") print("2.1 Semd email to all students reminding them to renew") print("0. Return to main menu") option = input("Option: ") Loading @@ -184,6 +186,10 @@ def reminderMenu(): reminderMenu() if (option == "2"): sendReminderEmail(studentsBad) sendReminderEmail(societiesBad) sendReminderEmail(associatesBad) if (option == "2.1"): sendReminderEmail(studentsBad) if (option == "0"): mainMenu() else: Loading @@ -194,6 +200,7 @@ def deleteMenu(deleteArray): print("1. View list of accounts to be deleted") print("2. Add/delete users from delete list") print("3. Auto populate list of users to be deleted") print("3.1 Just add student accounts") print("9. Do the delete") print("0. Go back to main menu") Loading Loading @@ -221,7 +228,14 @@ def deleteMenu(deleteArray): for soc in societiesBad: print("Adding " + str(soc[0]) + " to the list because the DB says: " + str(soc[1]) ) deleteArray.append(soc[0]) for ass in associatesBad: print("Adding " + str(ass[0]) + " to the list because the DB says: " + str(ass[1]) ) deleteArray.append(ass[0]) deleteMenu(deleteArray) elif (option == "3.1"): for student in studentsBad: print("Adding " + str(student[0]) + " to the list because the DB says: " + str(student[1]) ) deleteArray.append(student[0]) elif (option == "9"): print("Nope not yet") deleteMenu(deleteArray) Loading Loading
sucsam.py +16 −2 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ def sendReminderEmail(listofpeeps): smtpConn = smtplib.SMTP('localhost') smtpConn.sendmail(sender, receiver, message.as_string()) smtpConn.quit() if debugmode > 0: #only send out one email instead of 85464684164864165 sys.exit(0) else: print("Renewal email template not found!") Loading Loading @@ -169,7 +170,8 @@ def reminderMenu(): print("Double check https://sucs.org/Admin/SU that everyone that has paid to renew has been marked as renwed. This tool doesn't do that job yet!") print("") print("1. View a list of accounts that aren't marked as renewed in the DB") print("2. Semd email to all students reminding them to renew") print("2 Semd email to all reminding them to renew") print("2.1 Semd email to all students reminding them to renew") print("0. Return to main menu") option = input("Option: ") Loading @@ -184,6 +186,10 @@ def reminderMenu(): reminderMenu() if (option == "2"): sendReminderEmail(studentsBad) sendReminderEmail(societiesBad) sendReminderEmail(associatesBad) if (option == "2.1"): sendReminderEmail(studentsBad) if (option == "0"): mainMenu() else: Loading @@ -194,6 +200,7 @@ def deleteMenu(deleteArray): print("1. View list of accounts to be deleted") print("2. Add/delete users from delete list") print("3. Auto populate list of users to be deleted") print("3.1 Just add student accounts") print("9. Do the delete") print("0. Go back to main menu") Loading Loading @@ -221,7 +228,14 @@ def deleteMenu(deleteArray): for soc in societiesBad: print("Adding " + str(soc[0]) + " to the list because the DB says: " + str(soc[1]) ) deleteArray.append(soc[0]) for ass in associatesBad: print("Adding " + str(ass[0]) + " to the list because the DB says: " + str(ass[1]) ) deleteArray.append(ass[0]) deleteMenu(deleteArray) elif (option == "3.1"): for student in studentsBad: print("Adding " + str(student[0]) + " to the list because the DB says: " + str(student[1]) ) deleteArray.append(student[0]) elif (option == "9"): print("Nope not yet") deleteMenu(deleteArray) Loading