Skip to content
Commits on Source (3)
Hi {$realname},
Your Swansea University Computer Society account ({$username}) is up for renewal, this costs just £5 for the academic year.
You can renew by simply buying membership at https://sucs.org/join.
Failure to do so will result in your account being deleted.
If you believe you have already paid for this year please let us know ASAP.
--
Sent by {$adminname}
Swansea University Computer Society
https://sucs.org/
Hi {$realname},
Your Swansea University Computer Society account ({$username}) is up for renewal, this costs £20 for the academic year.
You can renew by simply buying associate membership at https://sucs.org/join.
Failure to do so will result in your account being deleted.
If you believe you have already paid for this year please let us know ASAP.
--
Sent by {$adminname}
Swansea University Computer Society
https://sucs.org/
......@@ -83,7 +83,7 @@ def sendReminderEmail(listofpeeps):
data = data.replace("{$adminname}",adminname)
sender = 'staff@sucs.org'
if debugmode > 0:
receiver = 'imranh@sucs.org'
receiver = adminname + '@sucs.org'
else:
receiver = email
message = MIMEMultipart()
......@@ -101,8 +101,8 @@ def sendReminderEmail(listofpeeps):
if debugmode > 0: # only send out one email instead of 85464684164864165
sys.exit(0)
else:
print("Renewal email template not found!")
else:
print("Renewal email template not found!")
sys.exit(4)
if debugmode == 0:
file = codecs.open("renewal-notify-email", encoding='utf-8')
......@@ -367,22 +367,24 @@ def deleteUser(peopleList):
def reminderMenu():
print("")
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("Double check https://sucs.org/Admin/SU that everyone that has paid to renew has been marked as renewed. 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 reminding them to renew")
print("2.1 Semd email to all students reminding them to renew")
print("2 Send email to ALL reminding them to renew")
print("2.1 Send email to all STUDENTS reminding them to renew")
print("2.2 Send email to all SOCIETIES reminding them to renew")
print("2.3 Send email to all ASSOCIATES reminding them to renew")
print("0. Return to main menu")
option = input("Option: ")
if option == "1":
for student in studentsBad:
print(str(student[0]) + " because the DB says: " + str(student[1]))
print(str(student[0]) + " last paid: " + str(student[1]))
for soc in societiesBad:
print(str(soc[0]) + " because the DB says: " + str(soc[1]))
print(str(soc[0]) + " last paid: " + str(soc[1]))
for ass in associatesBad:
print(str(ass[0]) + " because the DB says: " + str(ass[1]))
print(str(ass[0]) + " last paid: " + str(ass[1]))
reminderMenu()
if option == "2":
if len(studentsBad) > 0:
......@@ -394,6 +396,12 @@ def reminderMenu():
if option == "2.1":
if len(studentsBad) > 0:
sendReminderEmail(studentsBad)
if option == "2.2":
if len(societiesBad) > 0:
sendReminderEmail(societiesBad)
if option == "2.3":
if len(associatesBad) > 0:
sendReminderEmail(associatesBad)
if option == "0":
mainMenu()
else:
......