django-anymail
django-anymail copied to clipboard
Amazon SES: support extra_headers, metadata, tags for template sends
Originally, AWS's ses::SendBulkEmail API didn't allow specifying email headers. Since Anymail's Amazon SES backend also uses custom headers for metadata and tags, this meant you couldn't use any of the following message options together with a template_id:
headers(a.k.a.extra_headers)metadataormerge_metadatatags(except a single tag when usingAMAZON_SES_MESSAGE_TAG_NAME)
In March, AWS added a new ReplacementHeaders parameter for ses::SendBulkEmail, which allows per-recipient custom headers. In early May, the new parameter was made available in boto3.
Anymail should use SES's new ReplacementHeaders to support extra_headers, metadata, merge_metadata, and tags in template sends.
(Related: #371)