Skip to content

Possible to have duplicate email addresses in merge_data with different fields? #279

Answered by medmunds
chrisgrande asked this question in Q&A
Discussion options

You must be logged in to vote

Short answer: no, if you want to send two messages with different merge data to the same email address, you'll need to do that as two separate sends, not a single batch send.

Longer answer: this is a limitation in Anymail's batch sending. Anymail's merge_data is structured as a dict keyed by recipient email, which means each recipient address can only appear once in it. (Unless you play games with case sensitivity, which, please don't. BTW, Anymail inherited the merge_data dict approach from the predecessor Djrill project.)

Postmark's batch send API (and it looks like every other ESP except Mailgun) actually allows the same recipient to appear multiple times with different data, generatin…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@chrisgrande
Comment options

@medmunds
Comment options

Answer selected by chrisgrande
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
future design Ideas/improvements that need some design work
2 participants