Autonomous email outreach with Gmail SMTP and Node.js
Описание и применение
Автоматизация рассылки персонализированных писем через Gmail SMTP с помощью Node.js, уменьшая ручной труд и повышая масштабируемость.
Задача
Manual outreach is time‑consuming and repetitive, especially when sending personalized emails to multiple recipients.
Результат
The script sends emails to each recipient, logging success or error messages, and demonstrates basic personalization via a template string.
Рабочий процесс
- Create a Node.js project and initialize npm
- Install nodemailer and dotenv
- Create a .env file with EMAIL_USER and EMAIL_PASS (app password)
- Write index.js to configure nodemailer transporter
- Define sendEmail function to send individual emails
- Create main function with recipient list, subject, and HTML template
- Iterate over recipients and call sendEmail
- Run the script with node index.js
Доказательства
You'll need to enable “Less Secure App Access” or (better) use an App Password.
npm install nodemailer dotenv
node index.js
- Дата записи: 2026-10-12T01:55:57.500Z