Return to Snippet

Revision: 22587
at January 16, 2010 14:58 by martin_rusev

Initial Code
from django.template import loader, Context

t = loader.get_template('registration/email.txt')
c = Context({
  'name': form.cleaned_data['first_name'],
  'website_name': 'Website Name',
  'website_url': '',
  'login_url': '',
  'username': form.cleaned_data['username'],

from django.core.mail import send_mail

send_mail('Thanks for registering at your website', t.render(c), '[email protected]', [form.cleaned_data['email']], fail_silently=False)

Initial URL

Initial Description

Initial Title
Send HTML templates with Django

Initial Tags
email, html, django

Initial Language