简体   繁体   中英

How to send bulk personalized email using mailgun & nodejs

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

You should use mailing lists feature:

A mailing list is a group of members (recipients) which itself has an email address, like developers@mailgun.net. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM