MongoDB & SMTP: What's the most efficient way to email every user

Viewed 28

I have a Node.js & Mongoose App and I need to email every user in the MongoDB Database about a new Privacy Policy Change. I have a total of 10.000 users. What would be the most efficient & fastest way to send every user a email? I thought of a service like Postmark. Would that be a considerable option? How does Google do it to send so many emails in a short time?

My current approach (in Mongoose) would be this:

const users = await User.find({})
for (let user of users) {
    // send user a email using e.g. Nodemailer...
}
0 Answers
Related