Anymail: Django email integration for transactional ESPs

Version 10.3

Anymail lets you send and receive email in Django using your choice of transactional email service providers (ESPs). It extends the standard django.core.mail with many common ESP-added features, providing a consistent API that avoids locking your code to one specific ESP (and making it easier to change ESPs later if needed).

Anymail currently supports these ESPs:

  • Amazon SES

  • Brevo (formerly SendinBlue)

  • MailerSend

  • Mailgun

  • Mailjet

  • Mandrill (MailChimp transactional)

  • Postal (self-hosted ESP)

  • Postmark

  • Resend

  • SendGrid

  • SparkPost

  • Unisender Go

Anymail includes:

  • Integration of each ESP’s sending APIs into Django’s built-in email package, including support for HTML, attachments, extra headers, and other standard email features

  • Extensions to expose common ESP-added 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

  • Inbound message support, to receive email through your ESP’s webhooks, with simplified, portable access to attachments and other inbound content

Anymail maintains compatibility with all Django versions that are in mainstream or extended support, plus (usually) a few older Django versions, and is extensively tested on all Python versions supported by Django. (Even-older Django versions may still be covered by an Anymail extended support release; consult the changelog for details.)

Anymail releases follow semantic versioning. The package is released under the BSD license.

Documentation