You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several ESPs' batch send APIs allow specifying different email headers for individual recipients. Anymail should add a new merge_headers message option providing normalized support for this feature:
message=AnymailMessage(
to=["alice@example.com", "Bob <bob@example.com>"],
...,
# Common headers for all recipients:headers={
"List-Unsubscribe-Post": "List-Unsubscribe=One-Click",
},
# Recipient-specific headers:merge_headers={
"alice@example.com": {
"List-Unsubscribe": "<https://example.com/unsubscribe/98765abc>",
},
"bob@example.com": {
"List-Unsubscribe": "<https://example.com/unsubscribe/12345xyz>",
},
},
)
As the example shows, this is particularly useful for List-Unsubscribe headers that include a token identifying the recipient. The new merge_headers property is meant to parallel Anymail's existing merge_metadata and merge_data.
Several ESPs' batch send APIs allow specifying different email headers for individual recipients. Anymail should add a new
merge_headers
message option providing normalized support for this feature:As the example shows, this is particularly useful for List-Unsubscribe headers that include a token identifying the recipient. The new
merge_headers
property is meant to parallel Anymail's existingmerge_metadata
andmerge_data
.[Edit: updated info on supported ESPs]
Can support
merge_headers
:Cannot support
merge_headers
:In addition to providing the idea, @carrerasrodrigo has already implemented the base and Amazon SES support in #371. (Thanks!)
The text was updated successfully, but these errors were encountered: