> $ npm i (Run This Command To Install The Packages In The package.json )
Open models/send.js file and modify it with your details by configuring a .env file in the root of your porject's directory.
Add these fields in your
.env
file
GMAIL_USER = your e-mail
GMAIL_PASS =your password
I have already required .env moduel for you in models/send line 1
require('dotenv').config()
Run npm start to test this API.Use Postman in testing Use x-www-form-urlencoded in the body section of postman Define sender'name and give it name value Define sender's email and give it a value of email And lastly,define sender's message and give it a value of message
/api/sendmail/
/api/sendmail/contact
** AN EXAMPLE TO GET YOU STARTED **
name zaidanali
email developersavenue@gmail.com
message Hello I am a subscriber to your website who sent you am email