A brief description of what this project does and who it's for
A Node.js package for sending bulk emails using worker threads. This package ensures reliable email delivery with built-in error handling and validation.
To install the package, run:
npm install bulk-mailer2
Example:
const config = {
service: 'Gmail', // Example: 'Gmail', 'Yahoo', etc.
auth: {
user: 'your-email@gmail.com',
pass: 'your-email-password'
}
};
const emailData = [
{
to: 'recipient1@example.com',
subject: 'Welcome to Our Service!',
text: 'Thank you for signing up. We hope you enjoy our service.',
html: '<p>Thank you for signing up. We hope you enjoy our service.</p>'
},
{
to: 'recipient2@example.com',
subject: 'Monthly Newsletter',
text: 'Here is your monthly newsletter. Enjoy!',
html: '<p>Here is your monthly newsletter. Enjoy!</p>'
}
// Add more email objects as needed
];
const { sendEmails } = require('bulk-mailer2');
sendEmails(config, emailData);