Anymail: Django email backends for Mailgun, Postmark, SendGrid and more

Version 0.8

Attention

PRE-1.0

Although several projects are using this package in production, the API and feature set are still evolving, and the package has not yet reached 1.0 status. Before 1.0, minor version bumps might include breaking changes (following semantic versioning rules). Please check the release notes

If you are switching to Anymail from Djrill, see the notes on Migrating from Djrill

Anymail integrates several transactional email service providers (ESPs) into Django, with a consistent API that lets you use ESP-added features without locking your code to a particular ESP.

It currently fully supports Mailgun, Postmark, SendGrid, and SparkPost, and has limited support for Mandrill.

Anymail normalizes ESP functionality so it “just works” with Django’s built-in django.core.mail package. It includes:

  • Support for HTML, attachments, extra headers, and other features of Django’s built-in email
  • Extensions that make it easy to use extra ESP functionality, like tags, metadata, and tracking, with code that’s portable between ESPs
  • Simplified inline images for HTML email
  • Normalized sent-message status and tracking notification, by connecting your ESP’s webhooks to Django signals
  • “Batch transactional” sends using your ESP’s merge and template features

Anymail is released under the BSD license. It is extensively tested against Django 1.8–1.11 (including Python 2.7, Python 3 and PyPy). Anymail releases follow semantic versioning.