Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Convenient helper to send multipart/alternative or regular email based on templates.

Project Description

This small module is inspired by my need for sending templated emails, with the
option of attaching an HTML formatted alternative.



pip install django-email-templates

Example usage

The following example demonstrates how to send a templated email, in this case
the user has submitted a contact form. The module will look for the templates
contact.txt and contact.html which will serve as the plaintext and html alternative
of the email. The default location of the templates is a directory named *email_templates*.::

from email_templates import send_templated_mail

context = {
'name': request.POST['name'],
'email': request.POST['email'],
'telephone': request.POST['phone'],
'message': request.POST['message'],

success = send_templated_mail(
'Contact form submission',
[a[1] for a in settings.ADMINS],

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.0 kB) Copy SHA256 Hash SHA256
Egg 2.6 Mar 20, 2011
(3.4 kB) Copy SHA256 Hash SHA256
Source None Mar 20, 2011

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers