Coder Social home page Coder Social logo

node-mail-sms-notifier's Introduction

node-mail-sms-notifier

Node JS project to send out mail and sms using nodemailer and twilio

This acts as notification server part where in using REST ful APIs exposed by this express server, user can send out mail or sms to users.

How to run

npm start

or

if you have nodemon installed globally, then for development to rebuild automatically based on changes then

npm run start-app

APIs exposed

These APIs can be consumed by any client app like, Android, ReactJS etc..

Sending SMS - This uses twilio free trial account

http://localhost:3000/sms

Sending MAIL - This uses node-mailer and GSuite mail APIs from Google

http://localhost:3000/email

Screenshots with body of the post api calls

alt text

alt text

Configurations

For SMS SDK by Twilio, we need to provide following config in node-mail-sms-notifier/config/sms-config.js

const accountAuth = {
  accountSid: "<YOUR_TWILLIO_ACCOUNT_SID>",
  authToken: "<YOUR_AUTH_TOKEN>",
  twilioPhoneNum: "<YOUR_TWILLIO_PHONENUM>"
};

For node-mailer we have to provide GSuite service accoint configurations- it is not uploaded in repo but you can follow this link and put the json file in node-mail-sms-notifier/config/ and mention this file name in node-mail-sms-notifier/clients/ems-client.js as shown below

const authConfig = require("../config/node-mail-sms-notifier-3671247c7eef.json");

node-mail-sms-notifier-3671247c7eef.json this is the json file downloaded from Google Developers Page when creating service account.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.