Added send_task_reminder (Email_Utils.py)

This commit is contained in:
Sagi Dayan 2015-08-02 17:27:17 +03:00
parent 100b37e243
commit e4302df638

View file

@ -125,3 +125,61 @@ def notify_se_hub_campus_request(campus, campus_name):
</html>
"""
message.send()
def send_task_reminder( email, name, task_name, course_name):
message = mail.EmailMessage(sender="SE-Hub Support <se-hub@appspot.gserviceaccount.com>",
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 = """
<html><head></head><body>
<div>
<center>
<img src='https://cloud.githubusercontent.com/assets/2984053/6825467/7c9d0402-d303-11e4-9827-62a6d66f937a.png'>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
</center>
</div>
<div style='width:70%'>
<h3>Dear """+name+""":</h3>
<center>
<img src='https://pixabay.com/static/uploads/photo/2014/03/05/07/54/reminder-279903_640.png'>
</center>
<br>
You Have A Task that Due tomorrow! don't forget to submit the task.<br>
Task name: """ + task_name + """ <br>
In Course: """ + course_name + """ <br>
<br>
<a href='http://se-hub.appspot.com/'>SE - Hub</a>
</div>
<br><br>
Please let us know if you have any questions.
<br>
SE-Hub (c) 2015 niptop Team.
</body>
</html>
"""
message.send()