----
*2020-09-11*
Breaking changes
~~~~~~~~~~~~~~~~
* Require **Django 2.0 or later** and Python 3. (For compatibility with Django 1.11 and
Python 2.7, stay on the Anymail `v7.2 LTS`_ extended support branch by setting your
requirements to `django-anymail~=7.2`.)
* **Mailjet:** Upgrade to Mailjet's newer v3.1 send API. Most Mailjet users will not
be affected by this change, with two exceptions: (1) Mailjet's v3.1 API does not allow
multiple reply-to addresses, and (2) if you are using Anymail's `esp_extra`, you will
need to update it for compatibility with the new API. (See
`docs <https://anymail.dev/en/stable/esps/mailjet/#esp-extra-support>`__.)
* **SparkPost:** Call the SparkPost API directly, without using the (now unmaintained)
Python SparkPost client library. The "sparkpost" package is no longer necessary and
can be removed from your project requirements. Most SparkPost users will not be
affected by this change, with two exceptions: (1) You must provide a
``SPARKPOST_API_KEY`` in your Anymail settings (Anymail does not check environment
variables); and (2) if you use Anymail's `esp_extra` you will need to update it with
SparkPost Transmissions API parameters.
As part of this change esp_extra now allows use of several SparkPost features, such
as A/B testing, that were unavailable through the Python SparkPost library. (See
`docs <https://anymail.dev/en/stable/esps/sparkpost/>`__.)
* Remove Anymail internal code related to supporting Python 2 and older Django
versions. This does not change the documented API, but may affect you if your
code borrowed from Anymail's undocumented internals. (You should be able to switch
to the Python standard library equivalents, as Anymail has done.)
* AnymailMessageMixin now correctly subclasses Django's EmailMessage. If you use it
as part of your own custom EmailMessage-derived class, and you start getting errors
about "consistent method resolution order," you probably need to change your class's
inheritance. (For some helpful background, see this comment about
`mixin superclass ordering <https://nedbatchelder.com/blog/201210/multiple_inheritance_is_hard.html#comment_13805>`__.)
Features
~~~~~~~~
* **SparkPost:** Add support for subaccounts (new ``"SPARKPOST_SUBACCOUNT"`` Anymail
setting), AMP for Email (via ``message.attach_alternative(..., "text/x-amp-html")``),
and A/B testing and other SparkPost sending features (via ``esp_extra``). (See
`docs <https://anymail.dev/en/stable/esps/sparkpost/>`__.)