----
*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.