This application allows you to send personalized emails to multiple recipients in batches, using Next.js 15 App Router, TypeScript, and Nodemailer. Each recipient receives a customized greeting, while the email body remains the same for all.
- Bulk email sending with personalized greetings
- Added markdown to format your emails to be cool.
- Added Images support to attach Images to your emails.
- Throttling to avoid SMTP limits (20 emails per minute)
- Supports Gmail SMTP configuration
- User-friendly interface for sending emails
- Node.js (v16+)
- Next.js 15
- TypeScript
- Gmail account with app password enabled
git clone https://github.com/your-username/email-sender
cd email-sender
npm install
Create a .env.local
file in the root of your project with the following variables:
EMAIL=your-gmail@gmail.com
EMAIL_PASSWORD=your_gmail_app_password
Note: You need to use an app password for your Gmail account. Follow these steps to set it up:
- Go to your Google Account settings
- Navigate to Security
- Under "Signing in to Google," select "App Passwords"
- Generate a new app password for "Mail" and "Other (Custom name)"
- Use this generated password in your
.env.local
file
To run the app in development mode, use:
npm run dev
The application should now be accessible at http://localhost:3000.
- Open your browser and navigate to http://localhost:3000
- You'll see a user interface with fields for:
- Recipient email addresses (comma-separated)
- Email subject
- Email body
- Fill in the required information
- Click the "Send Emails" button to start the bulk email process
- The application will send personalized emails to each recipient and display the results
- The application uses Gmail's SMTP server, which has a limit of 500 emails per day for free accounts
- Emails are sent in batches to avoid rate limiting (20 emails per minute)
- Make sure your Gmail account has "Less secure app access" enabled or use an app password as described above
If you encounter any issues with authentication or sending emails, double-check your Gmail app password and ensure it's correctly set in the .env.local
file.
- Enable document files attachement feature
- Any other idea to improve that i will have 👌😊
Feel free to submit issues or pull requests if you have suggestions for improvements or find any bugs.
This project is open-source and available under the MIT License.