Skip to content

Per-recipient metadata #141

@medmunds

Description

@medmunds

PR #134 proposes a new merge_metadata feature, which allows providing unique metadata for each recipient in a batch send. The PR implements merge_metadata for SendGrid.

Should implement per-recipient metadata for these ESPs that can support it:

  • Mailgun (somewhat complicated: Anymail uses "custom variables" for metadata; these can be set per-recipient using "recipient variables"; need to avoid conflicts with merge_data, which also uses recipient variables)
  • Mailjet (batch send is an array of individual messages, including Mj-EventPayLoad)
  • Mandrill (top-level recipient_metadata is exactly the same form as proposed merge_metadata)
  • Postmark (batch send is an array of individual messages, including metadata)
  • SendGrid (individual custom_args in personalizations array are merged with top-level custom_args: PR Support for per-message meta data for SendGrid #134)
  • SparkPost (individual metadata in recipients array are merged with top-level metadata)

It won't be possible to implement merge_metadata for these ESPs:

  • Amazon SES: not possible (Anymail uses X-Metadata custom header; SendBulkTemplatedEmail doesn't currently support custom headers)
  • SendinBlue: not applicable (SendinBlue's transactional APIs don't support batch sending)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions