-
-
Save fachryansyah/90b78f81ece9e7d4ea238bf5f0066e36 to your computer and use it in GitHub Desktop.
mail.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { parentPort, workerData } = require('worker_threads'); | |
const { sendMail } = require("../module/mailer"); | |
// Perform send mail | |
parentPort.once("message", (message) => { | |
message.forEach(async item => { | |
await sendMail(item.transporterOptions, item.mailOptions, item.num); | |
}); | |
}); | |
// Send the hashedArray to the parent thread | |
// parentPort.postMessage("Oke sended!"); | |
// process.exit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment