All Projects → anymail → Django Anymail

anymail / Django Anymail

Licence: other
Django email backends and webhooks for Amazon SES, Mailgun, Mailjet, Postmark, SendGrid, Sendinblue, SparkPost and more

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Anymail

Omnimail
Send email across all platforms using one interface
Stars: ✭ 325 (-70.69%)
Mutual labels:  email, sendgrid, mailgun
Magento2 Gmail Smtp App
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers
Stars: ✭ 281 (-74.66%)
Mutual labels:  email, sendgrid, mailgun
Fluentemail
All in one email sender for .NET. Supports popular senders (SendGrid, MailGun, etc) and Razor templates.
Stars: ✭ 1,888 (+70.24%)
Mutual labels:  email, sendgrid, mailgun
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (-34.45%)
Mutual labels:  email, sendgrid, mailgun
Mailer
A light-weight, modular, message representation and mail delivery framework for Python.
Stars: ✭ 225 (-79.71%)
Mutual labels:  email, sendgrid, mailgun
mailgun-plsql-api
Oracle PL/SQL API for Mailgun
Stars: ✭ 30 (-97.29%)
Mutual labels:  email, mailgun
Grunt Email Workflow
A Grunt workflow for designing and testing responsive HTML email templates with SCSS.
Stars: ✭ 3,010 (+171.42%)
Mutual labels:  email, mailgun
Email Templates
📫 Create, preview, and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more!
Stars: ✭ 3,291 (+196.75%)
Mutual labels:  email, sendgrid
Sendgrid Java
The Official Twilio SendGrid Led, Community Driven Java API Library
Stars: ✭ 380 (-65.73%)
Mutual labels:  email, sendgrid
wemail
Send Affordable Bulk Email Campaign Through WordPress
Stars: ✭ 19 (-98.29%)
Mutual labels:  mailgun, sendgrid
Airform
Functional HTML forms for Front-End Developers.
Stars: ✭ 307 (-72.32%)
Mutual labels:  sendgrid, mailgun
Sendgrid Ruby
The Official Twilio SendGrid Led, Community Driven Ruby API Library
Stars: ✭ 520 (-53.11%)
Mutual labels:  email, sendgrid
SlmMail
Send mail from Laminas or Mezzio using external mail services.
Stars: ✭ 107 (-90.35%)
Mutual labels:  mailgun, sendgrid
mailcoach-support
Questions and support for Mailcoach
Stars: ✭ 32 (-97.11%)
Mutual labels:  mailgun, sendgrid
content-reminder
⏰ A GitHub Action that reminds you to share your own content
Stars: ✭ 28 (-97.48%)
Mutual labels:  email, sendgrid
Laravel Mailbox
Catch incoming emails in your Laravel application
Stars: ✭ 783 (-29.4%)
Mutual labels:  sendgrid, mailgun
Sendgrid Csharp
The Official Twilio SendGrid Led, Community Driven C#, .NetStandard, .NetCore API Library
Stars: ✭ 835 (-24.71%)
Mutual labels:  email, sendgrid
Hawkpost
Generate links that users can use to submit messages encrypted with your public key.
Stars: ✭ 843 (-23.99%)
Mutual labels:  django, email
go-mail
📧 A cross platform mail driver for GoLang. Featuring Mailgun, Postal, Postmark, SendGrid, SparkPost & SMTP.
Stars: ✭ 169 (-84.76%)
Mutual labels:  mailgun, sendgrid
nest-sendgrid
No description or website provided.
Stars: ✭ 24 (-97.84%)
Mutual labels:  email, sendgrid

Anymail: Django email integration for transactional ESPs

.. This README is reused in multiple places: * Github: project page, exactly as it appears here * Docs: shared-intro section gets included in docs/index.rst quickstart section gets included in docs/quickstart.rst * PyPI: project page (via setup.py long_description), with several edits to freeze it to the specific PyPI release (see long_description_from_readme in setup.py) You can use docutils 1.0 markup, but not any Sphinx additions. GitHub rst supports code-block, but no other block directives.

.. default-role:: literal

.. _shared-intro:

.. This shared-intro section is also included in docs/index.rst

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 Amazon SES, Mailgun, Mailjet, Postmark, SendinBlue, 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 <https://docs.djangoproject.com/en/stable/topics/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
  • 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 <https://anymail.readthedocs.io/en/stable/changelog/>_ for details.)

Anymail releases follow semantic versioning <https://semver.org/>_. The package is released under the BSD license.

.. END shared-intro

.. image:: https://github.com/anymail/django-anymail/workflows/test/badge.svg?branch=main :target: https://github.com/anymail/django-anymail/actions?query=workflow:test+branch:main :alt: build status in GitHub Actions

.. image:: https://readthedocs.org/projects/anymail/badge/?version=stable :target: https://anymail.readthedocs.io/en/stable/ :alt: documentation on ReadTheDocs

Resources

Anymail 1-2-3

.. _quickstart:

.. This quickstart section is also included in docs/quickstart.rst

Here's how to send a message. This example uses Mailgun, but you can substitute Mailjet or Postmark or SendGrid or SparkPost or any other supported ESP where you see "mailgun":

  1. Install Anymail from PyPI:

    .. code-block:: console

     $ pip install "django-anymail[mailgun]"
    

    (The [mailgun] part installs any additional packages needed for that ESP. Mailgun doesn't have any, but some other ESPs do.)

  2. Edit your project's settings.py:

    .. code-block:: python

     INSTALLED_APPS = [
         # ...
         "anymail",
         # ...
     ]
    
     ANYMAIL = {
         # (exact settings here depend on your ESP...)
         "MAILGUN_API_KEY": "<your Mailgun key>",
         "MAILGUN_SENDER_DOMAIN": 'mg.example.com',  # your Mailgun domain, if needed
     }
     EMAIL_BACKEND = "anymail.backends.mailgun.EmailBackend"  # or sendgrid.EmailBackend, or...
     DEFAULT_FROM_EMAIL = "[email protected]"  # if you don't already have this in settings
     SERVER_EMAIL = "[email protected]"  # ditto (default from-email for Django errors)
    
  3. Now the regular Django email functions <https://docs.djangoproject.com/en/stable/topics/email/>_ will send through your chosen ESP:

    .. code-block:: python

     from django.core.mail import send_mail
    
     send_mail("It works!", "This will get sent through Mailgun",
               "Anymail Sender <[email protected]>", ["[email protected]"])
    

    You could send an HTML message, complete with an inline image, custom tags and metadata:

    .. code-block:: python

     from django.core.mail import EmailMultiAlternatives
     from anymail.message import attach_inline_image_file
    
     msg = EmailMultiAlternatives(
         subject="Please activate your account",
         body="Click to activate your account: https://example.com/activate",
         from_email="Example <[email protected]>",
         to=["New User <[email protected]>", "[email protected]"],
         reply_to=["Helpdesk <[email protected]>"])
    
     # Include an inline image in the html:
     logo_cid = attach_inline_image_file(msg, "/path/to/logo.jpg")
     html = """<img alt="Logo" src="cid:{logo_cid}">
               <p>Please <a href="https://example.com/activate">activate</a>
               your account</p>""".format(logo_cid=logo_cid)
     msg.attach_alternative(html, "text/html")
    
     # Optional Anymail extensions:
     msg.metadata = {"user_id": "8675309", "experiment_variation": 1}
     msg.tags = ["activation", "onboarding"]
     msg.track_clicks = True
    
     # Send it:
     msg.send()
    

.. END quickstart

See the full documentation <https://anymail.readthedocs.io/en/stable/>_ for more features and options, including receiving messages and tracking sent message status.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].