Django-anymail

Latest version: v12.0

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 10

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.dev/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.dev/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.dev/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.dev/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.dev/en/stable/esps/sendgrid/#sendgrid-templates>`__.)
* **SendGrid:** Allow merging `esp_extra["personalizations"]` dict into other message-derived
personalizations. (See
`docs <https://anymail.dev/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.dev/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.dev/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.

Page 5 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.