Search code examples
mandrill

Mandrill personalized message to recipients with same email


In a NodeJs app I'm using Mandrill to send email reminders to people signed up to different kind of events. Every five minutes the app check for ready reminders and send these. The number or reminders can vary from zero to many at every check.

But here comes the problems:

If for example 3 ready reminder are found at a certain check, and two of these have the same recipient (same email), but different merge_vars because they are about different events. When sent only one (the first found?) set of merge_vars will be used to both of these recipients.

So, how do I keep unique merge_vars even to multiple recipients with the same email? I guess i could split duplicated email adresses into several different calls. But I would really like to do one call, and send one array of recipients. Is it possible?


Solution

  • At this time, Mandrill uses email addresses as a unique identifier for merge vars in API calls, so it's only possible to provide one set of merge values for an email address, even if you've specified that address multiple times in the messages.to parameter. If you have multiple unique emails to send to the same recipient, that should be handled in separate API calls at this time.