npm install
node index.js
This is will host the website on port 3000.
- Create a file named .env. And put this inside it:
SENDER_EMAIL='emailid-of-account-to-send-mails-from' SENDER_PASS='password-of-account-to-send-mails-from' TO_MAIL='emailid-of-account-to-send-mails-to'
- Go to this link https://www.google.com/settings/security/lesssecureapps.
Make sure you are logged in from the
SENDER_MAIL
account and flip the switch.