django-anymail icon indicating copy to clipboard operation
django-anymail copied to clipboard

Amazon SES: support extra_headers, metadata, tags for template sends

Open medmunds opened this issue 1 year ago • 0 comments

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)
  • metadata or merge_metadata
  • tags (except a single tag when using AMAZON_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)

medmunds avatar May 21 '24 19:05 medmunds