A Node.js application for sending personalized bulk emails to potential developer candidates. The application reads recipient data from an Excel file and sends professional HTML emails with proper rate limiting and error handling.
- 📊 Excel file support for managing recipient data
- ✉️ Professional HTML email templates
- 🔄 Automatic retry logic for failed emails
- ⚡ Rate limiting to prevent spam flags
- 🔒 Input sanitization and validation
- 📈 Progress tracking and success rate reporting
- 🎨 Customizable email templates
- ⏱️ Connection pooling for better performance
- Node.js (v14 or higher)
- Gmail account
- Gmail App Password (2FA must be enabled)
- Clone the repository:
git clone https://github.com/Stroller15/auto-bulk-email-sender.git
cd auto-bulk-email-sender- Install dependencies:
npm install- Create a
.envfile in the root directory:
EMAIL_USER=[email protected]
EMAIL_PASSWORD=your-app-specific-password
EMAIL_LIMIT=50
EMAIL_SIGNATURE=Your Name- Go to your Google Account settings
- Enable 2-Step Verification if not already enabled
- Go to Security → App passwords
- Select "Mail" and "Other (Custom name)"
- Copy the generated password and use it in your
.envfile
Create an Excel file with the following columns:
Name: Full name of the recipientEmail: Valid email addressTitle: Current job titleCompany: Company name
Example:
| Name | Title | Company | |
|---|---|---|---|
| John Doe | [email protected] | Senior Developer | Tech Corp |
| Jane Smith | [email protected] | Lead Engineer | Dev Inc |
Run the application with:
node emailSender.js path/to/your/excel-file.xlsxThe script will:
- Validate your environment variables
- Load and validate the Excel file
- Verify SMTP connection
- Send emails with progress tracking
- Display a summary report
The application includes built-in rate limiting:
- Maximum 1 concurrent connection
- 2-second delay between emails
- Maximum 30 emails per minute
These settings can be modified in the createTransporter function.
- Retries failed emails up to 3 times
- 5-second delay between retry attempts
- Detailed error logging
- Input validation for all data
The email template can be customized by modifying the getEmailBody function. The current template includes:
- Personalized greeting
- Professional formatting
- Responsive design
- Unsubscribe information
- XSS protection
Adjust these environment variables in your .env file:
EMAIL_LIMIT: Maximum number of emails to sendEMAIL_SIGNATURE: Your signature for the emails
- Use environment variables for sensitive data
- Input sanitization prevents XSS attacks
- Rate limiting prevents spam flagging
- Validates email addresses and data structure
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Please ensure you comply with all applicable email regulations and privacy laws in your jurisdiction. This tool should only be used for legitimate business communications with proper consent from recipients.