Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
accountmanager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sucs
accountmanager
Compare revisions
1db8ade78589e23eb833dbfb00f950b50cf71f77 to 16d669c6f3b60c7ed98505d7ee2229e64ca8dbd4
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
sucs/accountmanager
Select target project
No results found
16d669c6f3b60c7ed98505d7ee2229e64ca8dbd4
Select Git revision
Swap
Target
sucs/accountmanager
Select target project
sucs/accountmanager
1 result
1db8ade78589e23eb833dbfb00f950b50cf71f77
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
Add email templates for societies and associates
· 134ac336
Alexander Moras
authored
6 years ago
134ac336
Add renewal reminder options for societies and associates
· 0e2557ce
Alexander Moras
authored
6 years ago
0e2557ce
Changed debug so emails get sent to current user
· 16d669c6
Alexander Moras
authored
6 years ago
16d669c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
2-email
+15
-0
15 additions, 0 deletions
2-email
5-email
+15
-0
15 additions, 0 deletions
5-email
sucsam.py
+17
-9
17 additions, 9 deletions
sucsam.py
with
47 additions
and
9 deletions
2-email
0 → 100644
View file @
16d669c6
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/
This diff is collapsed.
Click to expand it.
5-email
0 → 100644
View file @
16d669c6
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/
This diff is collapsed.
Click to expand it.
sucsam.py
View file @
16d669c6
...
...
@@ -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 ren
e
wed. 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
:
...
...
This diff is collapsed.
Click to expand it.