From 5d4227b4d3cd14ef67f60800ca7433e69eda1398 Mon Sep 17 00:00:00 2001 From: Madhusudan.C.S Date: Sat, 5 Dec 2009 10:01:38 +0530 Subject: Delegate remainder mail. --- scripts/mails.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mails.py b/scripts/mails.py index 686390e..c22f5a1 100644 --- a/scripts/mails.py +++ b/scripts/mails.py @@ -11,6 +11,7 @@ __authors__ = [ from django.template import loader from project.kiwipycon.talk.models import Talk +from django.contrib.auth.models import User def speaker_accepted(): @@ -31,6 +32,7 @@ def speaker_accepted(): talk.speaker.email_user(subject=subject, message=message, from_email='admin@scipy.in') + def speaker_sponsorship(): """Sends a mail to each speaker whose talk has been accepted informing them about the their sponsorship. @@ -47,4 +49,22 @@ def speaker_sponsorship(): 'title': talk.title}) talk.speaker.email_user(subject=subject, message=message, - from_email='admin@scipy.in') \ No newline at end of file + from_email='admin@scipy.in') + + +def delegate_remainder(): + """Sends a mail to each speaker whose talk has been accepted + informing them about the their sponsorship. + """ + + regs = User.objects.all() + + template = 'notifications/remainder_mail.html' + + for reg in regs: + subject = 'SciPy.in 2009: Remainder and details' + message = loader.render_to_string( + template, dictionary={'name': reg.user.username}) + + reg.user.email_user(subject=subject, message=message, + from_email='admin@scipy.in') \ No newline at end of file -- cgit