summaryrefslogtreecommitdiff
path: root/workshop_app/reminder_script.py
diff options
context:
space:
mode:
authorAkshen2017-11-10 11:59:13 +0530
committerGitHub2017-11-10 11:59:13 +0530
commite1aa8adcb6c220e0847369eb79e504479f57b69e (patch)
tree3e392a65cb41176de011d063b0d7dcd2a93cf0ac /workshop_app/reminder_script.py
parent8d257869b046228dbfdca837e7e53aec817f1f24 (diff)
parentf66594b81b35cc4da21ecf36bd56e7e855b503dd (diff)
downloadworkshop_booking-e1aa8adcb6c220e0847369eb79e504479f57b69e.tar.gz
workshop_booking-e1aa8adcb6c220e0847369eb79e504479f57b69e.tar.bz2
workshop_booking-e1aa8adcb6c220e0847369eb79e504479f57b69e.zip
Merge pull request #27 from Akshen/develop
Send Reminder Mails to Coordinators
Diffstat (limited to 'workshop_app/reminder_script.py')
-rw-r--r--workshop_app/reminder_script.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/workshop_app/reminder_script.py b/workshop_app/reminder_script.py
index e346c6d..c30a717 100644
--- a/workshop_app/reminder_script.py
+++ b/workshop_app/reminder_script.py
@@ -58,6 +58,24 @@ def send_email():
[w.proposed_workshop_instructor.email], fail_silently=False
)
+ message = dedent("""\
+ Dear {0},
+
+ This is to remind you that
+ you have a workshop on {1},
+ for {2}.
+
+ You will receive course instructions from our Instructor shortly.
+
+ Thank You.
+ """.format(w.proposed_workshop_coordinator.get_full_name(),
+ w.proposed_workshop_date, w.proposed_workshop_title))
+ send_mail(
+ "Gentle Reminder about workshop on {0}"
+ .format(w.proposed_workshop_date),message, SENDER_EMAIL,
+ [w.proposed_workshop_coordinator.email], fail_silently=False
+ )
+
for w in upcoming_requested_workshops:
message = dedent("""\
Dear {0},
@@ -80,4 +98,22 @@ def send_email():
[w.requested_workshop_instructor.email], fail_silently=False
)
+ message = dedent("""\
+ Dear {0},
+
+ This is to remind you that
+ you have a workshop on {1},
+ for {2}.
+
+ You will receive course instructions from our Instructor shortly.
+
+ Thank You.
+ """.format(w.requested_workshop_coordinator.get_full_name(),
+ w.requested_workshop_date, w.requested_workshop_title))
+ send_mail(
+ "Gentle Reminder about workshop on {0}"
+ .format(w.requested_workshop_date),message, SENDER_EMAIL,
+ [w.requested_workshop_coordinator.email], fail_silently=False
+ )
+
send_email() \ No newline at end of file