This is a simple email sender using express and nodemailer
- clone this repo
- run
npm install
- create a
.env
file in the root directory and add the following:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your email address
MAIL_PASSWORD=your password
MAIL_ENCRYPTION=tls
MAIL_FROM=your email address
MAIL_FROM_NAME=your name
- run
npm start
- open
http://localhost:3000/v1/email/send
in your postman - send a POST request with the following body:
{
"to": "your email address",
"subject": "your subject",
"text": "your text"
}
- check your email
1.0.0