Autonomous email outreach with Gmail SMTP and Node.js
Description and use
Automate personalized outreach emails via Gmail SMTP using Node.js, reducing manual effort and enabling basic scaling.
Problem
Manual outreach is time‑consuming and repetitive, especially when sending personalized emails to multiple recipients.
Outcome
The script sends emails to each recipient, logging success or error messages, and demonstrates basic personalization via a template string.
Workflow
- 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
Evidence
You'll need to enable “Less Secure App Access” or (better) use an App Password.
npm install nodemailer dotenv
node index.js
- Record date: 2026-10-12T01:55:57.500Z