Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • G gesfipe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 35
    • Merge requests 35
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Prog
  • gesfipe
  • Merge requests
  • !272

Closed
Created May 19, 2021 by Prog@ProgMaintainer
  • Report abuse
Report abuse

Update django-anymail to 8.3

  • Overview 1
  • Commits 1
  • Changes 1

Created by: pyup-bot

This PR updates django-anymail from 2.0 to 8.3.

Changelog

8.3

----

*2021-05-19*

Fixes
~~~~~

* **Amazon SES:** Support receiving and tracking mail in non-default (or multiple)
AWS regions. Anymail now always confirms an SNS subscription in the region where
the SNS topic exists, which may be different from the boto3 default. (Thanks to
`mark-mishyn`_ for reporting this.)

* **Postmark:** Fix two different errors when sending with a template but no merge
data. (Thanks to `kareemcoding`_ and `Tobeyforce`_ for reporting them.)

* **Postmark:** Fix silent failure when sending with long metadata keys and some
other errors Postmark detects at send time. Report invalid 'cc' and 'bcc' addresses
detected at send time the same as 'to' recipients. (Thanks to `chrisgrande`_ for
reporting the problem.)

8.2

-----

*2021-01-27*

Features
~~~~~~~~

* **Mailgun:** Add support for AMP for Email
(via ``message.attach_alternative(..., "text/x-amp-html")``).

Fixes
~~~~~

* **SparkPost:** Drop support for multiple `from_email` addresses. SparkPost has
started issuing a cryptic "No sending domain specified" error for this case; with
this fix, Anymail will now treat it as an unsupported feature.

Other
~~~~~

* **Mailgun:** Improve error messages for some common configuration issues.

* Test against Django 3.2 prerelease (including support for Python 3.9)

* Document how to send AMP for Email with Django, and note which ESPs support it.
(See `docs <https://anymail.readthedocs.io/en/stable/sending/django_email/#amp-email>`__.)

* Move CI testing to GitHub Actions (and stop using Travis-CI).

* Internal: catch invalid recipient status earlier in ESP response parsing

8.1

----

*2020-10-09*

Features
~~~~~~~~

* **SparkPost:** Add option for event tracking webhooks to map SparkPost's "Initial Open"
event to Anymail's normalized "opened" type. (By default, only SparkPost's "Open" is
reported as Anymail "opened", and "Initial Open" maps to "unknown" to avoid duplicates.
See `docs <https://anymail.readthedocs.io/en/stable/esps/sparkpost/#sparkpost-webhooks>`__.
Thanks to `slinkymanbyday`_.)

* **SparkPost:** In event tracking webhooks, map AMP open and click events to the
corresponding Anymail normalized event types. (Previously these were treated as
as "unknown" events.)

8.0

----

*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.readthedocs.io/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.readthedocs.io/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.readthedocs.io/en/stable/esps/sparkpost/>`__.)

7.2.1

------

*2020-08-05*

Fixes
~~~~~

* **Inbound:** Fix a Python 2.7-only UnicodeEncodeError when attachments have non-ASCII
filenames. (Thanks to `kika115`_ for reporting it.)

7.2

--------

*2020-07-25*

This is an extended support release. Anymail v7.2 will receive security updates
and fixes for any breaking ESP API changes through at least July, 2021.

Fixes
~~~~~

* **Amazon SES:** Fix bcc, which wasn't working at all on non-template sends.
(Thanks to `mwheels`_ for reporting the issue.)

* **Mailjet:** Fix TypeError when sending to or from addresses with display names
containing commas (introduced in Django 2.2.15, 3.0.9, and 3.1).

* **SendGrid:** Fix UnicodeError in inbound webhook, when receiving message using
charsets other than utf-8, and *not* using SendGrid's "post raw" inbound parse
option. Also update docs to recommend "post raw" with SendGrid inbound. (Thanks to
`tcourtqtm`_ for reporting the issue.)


Features
~~~~~~~~

* Test against Django 3.1 release candidates


Deprecations
~~~~~~~~~~~~

*  This will be the last Anymail release to support Django 1.11 and Python 2.7.

If these deprecations affect you and you cannot upgrade, set your requirements to
`django-anymail~=7.2` (a "compatible release" specifier, equivalent to `>=7.2,==7.*`).

7.1

-----

*2020-04-13*

Fixes
~~~~~

* **Postmark:** Fix API error when sending with template to single recipient.
(Thanks to `jc-ee`_ for finding and fixing the issue.)

* **SendGrid:** Allow non-batch template send to multiple recipients when
`merge_global_data` is set without `merge_data`. (Broken in v6.0. Thanks to
`vgrebenschikov`_ for the bug report.)

Features
~~~~~~~~

* Add `DEBUG_API_REQUESTS` setting to dump raw ESP API requests, which can assist
in debugging or reporting problems to ESPs.
(See `docs <https://anymail.readthedocs.io/en/stable/installation/#std:setting-ANYMAIL_DEBUG_API_REQUESTS>`__.
This setting has was quietly added in Anymail v4.3, and is now officially documented.)

* **Sendinblue:** Now supports file attachments on template sends, when using their
new template language. (Sendinblue removed this API limitation on 2020-02-18; the
change works with Anymail v7.0 and later. Thanks to `sebashwa`_ for noting
the API change and updating Anymail's docs.)

Other
~~~~~

* Test against released Django 3.0.

* **SendGrid:** Document unpredictable behavior in the SendGrid API that can cause
text attachments to be sent with the wrong character set.
(See `docs <https://anymail.readthedocs.io/en/stable/esps/sendgrid/#limitations-and-quirks>`__
under "Wrong character set on text attachments." Thanks to `nuschk`_ and `swrobel`_
for helping track down the issue and reporting it to SendGrid.)

* Docs: Fix a number of typos and some outdated information. (Thanks `alee`_ and
`Honza-m`_.)

7.0

----

*2019-09-07*

Breaking changes
~~~~~~~~~~~~~~~~

* **Sendinblue templates:** Support Sendinblue's new (ESP stored) Django templates and
new API for template sending. This removes most of the odd limitations in the older
(now-deprecated) SendinBlue template send API, but involves two breaking changes:

* You *must* `convert <https://help.sendinblue.com/hc/en-us/articles/360000991960>`_
 each old Sendinblue template to the new language as you upgrade to Anymail v7.0, or
 certain features may be silently ignored on template sends (notably `reply_to` and
 recipient display names).

* Sendinblue's API no longer supports sending attachments when using templates.
 [Note: Sendinblue removed this API limitation on 2020-02-18.]

Ordinary, non-template sending is not affected by these changes. See
`docs <https://anymail.readthedocs.io/en/stable/esps/sendinblue/#batch-sending-merge-and-esp-templates>`__
for more info and alternatives. (Thanks `Thorbenl`_.)

Features
~~~~~~~~

* **Mailgun:** Support Mailgun's new (ESP stored) handlebars templates via `template_id`.
See `docs <https://anymail.readthedocs.io/en/stable/esps/mailgun/#batch-sending-merge-and-esp-templates>`__.
(Thanks `anstosa`_.)

* **Sendinblue:** Support multiple `tags`. (Thanks `Thorbenl`_.)


Other
~~~~~

* **Mailgun:** Disable Anymail's workaround for a Requests/urllib3 issue with non-ASCII
attachment filenames when a newer version of urllib3--which fixes the problem--is
installed. (Workaround was added in Anymail v4.3; fix appears in urllib3 v1.25.)

6.1

----

*2019-07-07*

Features
~~~~~~~~

* **Mailgun:** Add new `MAILGUN_WEBHOOK_SIGNING_KEY` setting for verifying tracking and
inbound webhook calls. Mailgun's webhook signing key can become different from your
`MAILGUN_API_KEY` if you have ever rotated either key.
See `docs <https://anymail.readthedocs.io/en/stable/esps/mailgun/#std:setting-ANYMAIL_MAILGUN_WEBHOOK_SIGNING_KEY>`__.
(More in `153`_. Thanks to `dominik-lekse`_ for reporting the problem and Mailgun's
`mbk-ok`_ for identifying the cause.)

6.0.1

------

*2019-05-19*

Fixes
~~~~~

* Support using `AnymailMessage` with django-mailer and similar packages that pickle
messages. (See `147`_. Thanks to `ewingrj`_ for identifying the problem.)

* Fix UnicodeEncodeError error while reporting invalid email address on Python 2.7.
(See `148`_. Thanks to `fdemmer`_ for reporting the problem.)

6.0

----

*2019-02-23*

Breaking changes
~~~~~~~~~~~~~~~~

* **Postmark:** Anymail's `message.anymail_status.recipients[email]` no longer
lowercases the recipient's email address. For consistency with other ESPs, it now
uses the recipient email with whatever case was used in the sent message. If your
code is doing something like `message.anymail_status.recipients[email.lower()]`,
you should remove the `.lower()`

* **SendGrid:** In batch sends, Anymail's SendGrid backend now assigns a separate
`message_id` for each "to" recipient, rather than sharing a single id for all
recipients. This improves accuracy of tracking and statistics (and matches the
behavior of many other ESPs).

If your code uses batch sending (merge_data with multiple to-addresses) and checks
`message.anymail_status.message_id` after sending, that value will now be a *set* of
ids. You can obtain each recipient's individual message_id with
`message.anymail_status.recipients[to_email].message_id`.
See `docs <https://anymail.readthedocs.io/en/stable/esps/sendgrid/#sendgrid-message-id>`__.

Features
~~~~~~~~

* Add new `merge_metadata` option for providing per-recipient metadata in batch
sends. Available for all supported ESPs *except* Amazon SES and SendinBlue.
See `docs <https://anymail.readthedocs.io/en/stable/sending/anymail_additions/#anymail.message.AnymailMessage.merge_metadata>`__.
(Thanks `janneThoft`_ for the idea and SendGrid implementation.)

* **Mailjet:** Remove limitation on using `cc` or `bcc` together with `merge_data`.


Fixes
~~~~~

* **Mailgun:** Better error message for invalid sender domains (that caused a cryptic
"Mailgun API response 200: OK Mailgun Magnificent API" error in earlier releases).

* **Postmark:** Don't error if a message is sent with only Cc and/or Bcc recipients
(but no To addresses). Also, `message.anymail_status.recipients[email]` now includes
send status for Cc and Bcc recipients. (Thanks to `ailionx`_ for reporting the error.)

* **SendGrid:** With legacy templates, stop (ab)using "sections" for merge_global_data.
This avoids potential conflicts with a template's own use of SendGrid section tags.

5.0

----

*2018-11-07*

Breaking changes
~~~~~~~~~~~~~~~~

* **Mailgun:** Anymail's status tracking webhooks now report Mailgun "temporary failure"
events as Anymail's normalized "deferred" `event_type`. (Previously they were reported
as "bounced", lumping them in with permanent failures.) The new behavior is consistent
with how Anymail handles other ESP's tracking notifications. In the unlikely case your
code depended on "temporary failure" showing up as "bounced" you will need to update it.
(Thanks `costela`_.)

Features
~~~~~~~~

* **Postmark:** Allow either template alias (string) or numeric template id for
Anymail's `template_id` when sending with Postmark templates.

Fixes
~~~~~

* **Mailgun:** Improve error reporting when an inbound route is accidentally pointed
at Anymail's tracking webhook url or vice versa.

4.3

----

*2018-10-11*

Features
~~~~~~~~

*  Treat MIME attachments that have a *Content-ID* but no explicit *Content-Disposition*
header as inline, matching the behavior of many email clients. For maximum
compatibility, you should always set both (or use Anymail's inline helper functions).
(Thanks `costela`_.)

Fixes
~~~~~

*  **Mailgun:** Raise `AnymailUnsupportedFeature` error when attempting to send an
attachment without a filename (or inline attachment without a *Content-ID*), because
Mailgun silently drops these attachments from the sent message. (See
`docs <https://anymail.readthedocs.io/en/stable/esps/mailgun/#limitations-and-quirks>`__.
Thanks `costela`_ for identifying this undocumented Mailgun API limitation.)
*  **Mailgun:** Fix problem where attachments with non-ASCII filenames would be lost.
(Works around Requests/urllib3 issue encoding multipart/form-data filenames in a way
that isn't RFC 7578 compliant. Thanks to `decibyte`_ for catching the problem.)

Other
~~~~~
*  Add (undocumented) DEBUG_API_REQUESTS Anymail setting. When enabled, prints raw
API request and response during send. Currently implemented only for Requests-based
backends (all but Amazon SES and SparkPost). Because this can expose API keys and
other sensitive info in log files, it should not be used in production.

4.2

----

*2018-09-07*

Features
~~~~~~~~

*  **Postmark:** Support per-recipient template `merge_data` and batch sending. (Batch
sending can be used with or without a template. See
`docs <https://anymail.readthedocs.io/en/stable/esps/postmark/#postmark-templates>`__.)

Fixes
~~~~~

*  **Postmark:** When using `template_id`, ignore empty subject and body. (Postmark
issues an error if Django's default empty strings are used with template sends.)

4.1

----

*2018-08-27*

Features
~~~~~~~~

*  **SendGrid:** Support both new "dynamic" and original "legacy" transactional
templates. (See
`docs <https://anymail.readthedocs.io/en/stable/esps/sendgrid/#sendgrid-templates>`__.)
*  **SendGrid:** Allow merging `esp_extra["personalizations"]` dict into other message-derived
personalizations. (See
`docs <https://anymail.readthedocs.io/en/stable/esps/sendgrid/#sendgrid-esp-extra>`__.)

4.0

----

*2018-08-19*

Breaking changes
~~~~~~~~~~~~~~~~

*  Drop support for Django versions older than Django 1.11.
(For compatibility back to Django 1.8, stay on the Anymail `v3.0`_
extended support branch.)
*  **SendGrid:** Remove the legacy SendGrid *v2* EmailBackend.
(Anymail's default since v0.8 has been SendGrid's newer v3 API.)
If your settings.py `EMAIL_BACKEND` still references "sendgrid_v2," you must
`upgrade to v3 <https://anymail.readthedocs.io/en/v3.0/esps/sendgrid/#upgrading-to-sendgrid-s-v3-api>`__.

Features
~~~~~~~~

*  **Mailgun:** Add support for new Mailgun webhooks. (Mailgun's original "legacy
webhook" format is also still supported. See
`docs <https://anymail.readthedocs.io/en/stable/esps/mailgun/#mailgun-webhooks>`__.)
*  **Mailgun:** Document how to use new European region. (This works in earlier
Anymail versions, too.)
*  **Postmark:** Add support for Anymail's normalized `metadata` in sending
and webhooks.

Fixes
~~~~~

*  Avoid problems with Gmail blocking messages that have inline attachments, when sent
from a machine whose local hostname ends in *.com*. Change Anymail's
`attach_inline_image()` default *Content-ID* domain to the literal text "inline"
(rather than Python's default of the local hostname), to work around a limitation
of some ESP APIs that don't permit distinct content ID and attachment filenames
(Mailgun, Mailjet, Mandrill and SparkPost). See `112`_ for more details.
*  **Amazon SES:** Work around an
`Amazon SES bug <https://forums.aws.amazon.com/thread.jspa?threadID=287048>`__
that can corrupt non-ASCII message bodies if you are using SES's open or click
tracking. (See `115`_ for more details. Thanks to `varche1`_ for isolating
the specific conditions that trigger the bug.)

Other
~~~~~

*  Maintain changelog in the repository itself (rather than in GitHub release notes).
*  Test against released versions of Python 3.7 and Django 2.1.

3.0

----

*2018-05-30*

This is an extended support release. Anymail v3.x will receive security updates
and fixes for any breaking ESP API changes through at least April, 2019.

Breaking changes
~~~~~~~~~~~~~~~~

*  Drop support for Python 3.3 (see `99`_).
*  **SendGrid:** Fix a problem where Anymail's status tracking webhooks didn't always
receive the same `event.message_id` as the sent `message.anymail_status.message_id`,
due to unpredictable behavior by SendGrid's API. Anymail now generates a UUID for
each sent message and attaches it as a SendGrid custom arg named anymail_id. For most
users, this change should be transparent. But it could be a breaking change if you
are relying on a specific message_id format, or relying on message_id matching the
*Message-ID* mail header or SendGrid's "smtp-id" event field. (More details in the
`docs <https://anymail.readthedocs.io/en/stable/esps/sendgrid/#sendgrid-message-id>`__;
also see `108`_.) Thanks to `joshkersey`_ for the report and the fix.

Features
~~~~~~~~

*  Support Django 2.1 prerelease.

Fixes
~~~~~

*  **Mailjet:** Fix tracking webhooks to work correctly when Mailjet "group events"
option is disabled (see `106`_).

Deprecations
~~~~~~~~~~~~

*  This will be the last Anymail release to support Django 1.8, 1.9, and 1.10
(see `110`_).
*  This will be the last Anymail release to support the legacy SendGrid v2 EmailBackend
(see `111`_). (SendGrid's newer v3 API has been the default since Anymail v0.8.)

If these deprecations affect you and you cannot upgrade, set your requirements to
`django-anymail~=3.0` (a "compatible release" specifier, equivalent to `>=3.0,==3.*`).

2.2

----

*2018-04-16*

Fixes
~~~~~

*  Fix a breaking change accidentally introduced in v2.1: The boto3 package is no
longer required if you aren't using Amazon SES.

2.1

----

*2018-04-11*

**NOTE:** v2.1 accidentally introduced a **breaking change:** enabling Anymail webhooks
with `include('anymail.urls')` causes an error if boto3 is not installed, even if you
aren't using Amazon SES. This is fixed in v2.2.

Features
~~~~~~~~

*  **Amazon SES:** Add support for this ESP
(`docs <https://anymail.readthedocs.io/en/stable/esps/amazon_ses/>`__).
*  **SparkPost:** Add SPARKPOST_API_URL setting to support SparkPost EU and SparkPost
Enterprise
(`docs <https://anymail.readthedocs.io/en/stable/esps/sparkpost/#std:setting-ANYMAIL_SPARKPOST_API_URL>`__).
*  **Postmark:** Update for Postmark "modular webhooks." This should not impact client
code. (Also, older versions of Anymail will still work correctly with Postmark's
webhook changes.)

Fixes
~~~~~

*  **Inbound:** Fix several issues with inbound messages, particularly around non-ASCII
headers and body content. Add workarounds for some limitations in older Python email
packages.

Other
~~~~~

*  Use tox to manage Anymail test environments (see contributor
`docs <https://anymail.readthedocs.io/en/stable/contributing/#testing>`__).

Deprecations
~~~~~~~~~~~~

*  This will be the last Anymail release to support Python 3.3. See `99`_ for more
information.
Links
  • PyPI: https://pypi.org/project/django-anymail
  • Changelog: https://pyup.io/changelogs/django-anymail/
  • Repo: https://github.com/anymail/django-anymail
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: pyup-update-django-anymail-2.0-to-8.3