I am trying to get Batch Sending to work over SMTP, but even though I'm sending to multiple recipients and I've specified user variables (and the variables are getting replaced successfully in the email that is sent), every single recipient shows up in the To: field of the resulting messages at the receiver.
Per MailGun's documentation on Batch Sending...
Warning: It is important when using Batch Sending to also use Recipient Variables. This tells Mailgun to send each recipient an individual email with only their email in the to field. If they are not used, all recipients’ email addresses will show up in the to field for each recipient.
Here is an example of my SMTP headers...
To: foo@example.com, bar@example.com
X-Mailgun-Recipient-Variables: {
"foo@example.com":
{
"id":"12345",
"email":"foo@example.com",
"first_name":"Foo"
},
"bar@example.com":
{
"id":"45678",
"email":"bar@example.com",
"first_name":"Bar"
}
}
The resulting emails should only show one recipient per email in the To field. Am I missing something?