Batch sending - Recipient variables
See original GitHub issueHi, Is it possible with mailgun-js to batch send emails to multiple addresses, but have each person to see only their email address in the ‘to’ field.
As mentioned in mailgun doc (https://documentation.mailgun.com/en/latest/user_manual.html?highlight=batch sending#batch-sending => section 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.
To achieve this, we should be able to send an object like this in the “to” field :
{ "user1@example.com" : {"unique_id": "ABC123456789"}, "user2@example.com" : {"unique_id": "ZXY987654321"} }
I’d rather do this and call the api once than calling it once for each recipient.
I can’t find a way to do this with the js library. Is it possible ?
Thanks !
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top GitHub Comments
Hi, I have had the same problem, but this works here too. It’s a bit confusing since the Package documentation differs from the main one on their main homepage.
This my sendingData and it works for me as intended (each recipient only sees their mail address and I have only one API-call):
OK you are correct, i had 2 issues