Mailgun: make merge_data work with stored handlebars templates

Mailgun has two different template mechanisms and two different ways
of providing substitution variables to them. Update Anymail's
normalized merge_data handling to work with either (while preserving
existing batch send and metadata capabilities that also use Mailgun's
custom data and recipient variables parameters).

Completes work started by @anstosa in #156.
Closes #155.
This commit is contained in:
Mike Edmunds
2019-09-03 11:51:19 -07:00
committed by GitHub
parent 8143b76041
commit df29ee2da6
6 changed files with 349 additions and 53 deletions

View File

@@ -25,6 +25,19 @@ Release history
^^^^^^^^^^^^^^^
.. This extra heading level keeps the ToC from becoming unmanageably long
vNext
-----
*Not yet released*
Features
~~~~~~~~
* **Mailgun:** Support Mailgun's new (ESP stored) handlebars templates via `template_id`.
See `docs <https://anymail.readthedocs.io/en/latest/esps/mailgun/#batch-sending-merge-and-esp-templates>`__.
(Thanks `@anstosa`_.)
v6.1
----
@@ -964,6 +977,7 @@ Features
.. _#153: https://github.com/anymail/issues/153
.. _@ailionx: https://github.com/ailionx
.. _@anstosa: https://github.com/anstosa
.. _@calvin: https://github.com/calvin
.. _@costela: https://github.com/costela
.. _@decibyte: https://github.com/decibyte