- download the project
$ git clone https://github.com/rdornelles/mail-send-api
- Install dependencies
$ npm install
- create
.env
in the root patch project
PORT = <80>
ORIGIN = <https://example.com>
RECAPTCHA_KEY = <secret key api recaptcha>
RECAPTCHA_URL = <https://www.google.com/recaptcha/api/siteverify>
MAIL_HOST = <mail.example.com>
MAIL_PORT = <586>
MAIL_SECURE = <false>
MAIL_AUTH_USER = <staff@example.com>
MAIL_AUTH_PASS = <12435678>
TEXT_MAIL_TITLE = <Contact form>
TEXT_MAIL_BODY = <contact from {name}, using mail: {email}, about: {comment}>
TEXT_MAIL_HTML = <contact from {name}, using mail: {email}, about: {comment}>
TEXT_RESPONSE_OK = <successful!>
TEXT_RESPONSE_FAIL_CAPTCHA = <Captcha failed. Try again!>
- run project
npm run start