diff options
Diffstat (limited to 'scripts/mails.py')
-rw-r--r-- | scripts/mails.py | 22 |
1 files changed, 21 insertions, 1 deletions
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 |