qcobjects-lib-sendemail

0.0.15 • Public • Published

QCObjects Lib SendMail (NodeMailer)

QCObjects Lib to send emails using NodeMailer and Gmail.

Instructions

  1. Install this dependency in your project using npm
npm i --save qcobjects-lib-sendemail
  1. In your config.json file, create the following settings
{
  "gmail_user":"$ENV(GMAIL_USER)",
  "gmail_password":"$ENV(GMAIL_PASSWORD)",
  "gmail_from":"$ENV(GMAIL_FROM)",
  "gmail_to":"$ENV(GMAIL_TO)",
  "sendemail_subject_user": "$ENV(SENDEMAIL_SUBJECT_USER)",
  "sendemail_subject_backoffice": "$ENV(SENDEMAIL_SUBJECT_BACKOFFICE)",
  "sendemail_user_template_file": "$ENV(SENDEMAIL_USER_TEMPLATE_FILE)",
  "sendemail_backoffice_template_file": "$ENV(SENDEMAIL_BACKOFFICE_TEMPLATE_FILE)",
  "gmail_subject":"$ENV(GMAIL_SUBJECT)"
}

Above settings will bring the API Key values from the following environment variables:

GMAIL_USER GMAIL_PASSWORD GMAIL_FROM GMAIL_TO SENDEMAIL_SUBJECT_USER SENDEMAIL_SUBJECT_BACKOFFICE GMAIL_SUBJECT

Learn more about NodeMailer in the official NodeMailer Documentation website

  1. Test the integration
npm test
  1. Start the QCObjects HTTP2 Server
qcobjects-server

If you haven't installed QCObjects before, learn more about Installing QCObjects here

Package Sidebar

Install

npm i qcobjects-lib-sendemail

Weekly Downloads

2

Version

0.0.15

License

LGPL-3.0-or-later

Unpacked Size

26.2 kB

Total Files

18

Last publish

Collaborators

  • jeanmachuca