From e4302df6385e86b891977a664ca2c8efb5438479 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Sun, 2 Aug 2015 17:27:17 +0300 Subject: [PATCH] Added send_task_reminder (Email_Utils.py) --- SE_API/Email_Utils.py | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/SE_API/Email_Utils.py b/SE_API/Email_Utils.py index 2939cc7..90f2ec4 100644 --- a/SE_API/Email_Utils.py +++ b/SE_API/Email_Utils.py @@ -125,3 +125,61 @@ def notify_se_hub_campus_request(campus, campus_name): """ message.send() + + +def send_task_reminder( email, name, task_name, course_name): + message = mail.EmailMessage(sender="SE-Hub Support ", + subject="Hey! Due Date for task " + task_name + " is TOMORROW!") + + message.to = email + + message.body = """ + Dear """+name+""": + + You Have A Task that Due tomorrow! don't forget to submit the task. + + Task name: """ + task_name + """ \n + In Course: """ + course_name + """ \n\n + + + http://se-hub.appspot.com + + + Please let us know if you have any questions. + + SE-Hub (c) 2015 niptop Team. + """ + + message.html = """ + +
+
+ + +
+
+
+

Dear """+name+""":

+ +
+ +
+
+ + You Have A Task that Due tomorrow! don't forget to submit the task.
+ + Task name: """ + task_name + """
+ In Course: """ + course_name + """
+
+ SE - Hub + +
+

+ Please let us know if you have any questions. +
+ SE-Hub (c) 2015 niptop Team. + + + """ + + message.send()