1
votes

The requirement is to send personalized email to more than 50k users, the recipient should be addressed by their names like below:

Subject : Hello [name]

Message : How are you [name] ? and some other text

I'm currently looping through the entire user collection to send the emails one at a time using Mailgun API and that's making 50k requests to mailgun server.

Mailgun API does not allow multiple subject or body, what's the best approach to solving this problem? I don't mind switching from mailgun

1

1 Answers

2
votes

You should use mailing lists feature:

A mailing list is a group of members (recipients) which itself has an email address, like [email protected]. This address becomes an ID for this mailing list.

Then you can add members to this list, and assign every member a name property and any other fields you'd like. After that recipient variables can be used to replace placeholders like %recipient.name% with a name of every contact automatically.

This feature is described in batch sending section of their docs, as well as another option that does not require to create a mailing list.