Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Django module to easily send templated emails.

Project Description

Django module to easily send templated emails


To install the app run :

pip install django-mailings

or add it to the list of requirements of your project.

Example usage

Use the BaseMailing class to define your email like:

from mailings.mailings import BaseMailing

class ExampleEmail(BaseMailing):
    """ """
    template_name = "myapp/mails/myemail.html"
    subject = "Example subject of email"

And send it using:


Where [''] is a list of emails of destination or a object with get_mailing_list method defined


To give support to this app we need to declare de following django settings:


    'DEFAULT_SUJECT': "Example subject",
    'BASE_URL': "",
    'EXTRA_DATA': {}
  • DEFAULT_FROM_EMAIL: Default setting of Django that defines the from email
  • DEFAULT_REPLY_TO: Default reply to be used on emails
  • DEFAULT_SUJECT: Default subject to be used on emails
  • BASE_URL: The base url of your website
  • EXTRA_DATA: Any extra data intended to be used on all emails (This is injected on context of template)

Running tests

To run tests we use tox:

# Run only unit tests
$ tox -e py27

# Run only flake8 tests
$ tox -e flake8

# Run only coverage tests
$ tox -e coverage

# Run unit and flake
$ tox
Release History

Release History

This version
History Node


Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting