scripts/mails.py
changeset 47 668e7e0881b6
parent 46 971ba6d7a529
child 48 bb835205604b
equal deleted inserted replaced
46:971ba6d7a529 47:668e7e0881b6
    57     informing them about the their sponsorship.
    57     informing them about the their sponsorship.
    58     """
    58     """
    59 
    59 
    60     regs = User.objects.all()
    60     regs = User.objects.all()
    61 
    61 
    62     template = 'notifications/remainder_mail.html'
    62     template = 'notifications/reminder_mail.html'
    63 
    63 
    64     for reg in regs:
    64     for reg in regs:
    65         subject = 'SciPy.in 2009: Remainder and details'
    65         subject = 'SciPy.in 2009: Remainder and details'
    66         message = loader.render_to_string(
    66         message = loader.render_to_string(
    67             template, dictionary={'name': reg.user.username})
    67             template, dictionary={'name': reg.username})
    68 
    68 
    69         reg.user.email_user(subject=subject, message=message,
    69         reg.email_user(subject=subject, message=message,
    70                             from_email='madhusudancs@gmail.com')
    70                        from_email='madhusudancs@gmail.com')