Giter VIP home page Giter VIP logo

sendemail's Introduction

sendEmail

NodeJs APIs to perform Email Scheduling.

Features :

  1. Schedule an Email.
  2. Reschedule an Email.
  3. Get details of scheduled emails.
  4. Delete a scheduled email.

Note

  1. Source email supports only gmail addressess(enable less secure app access in your gmail account)

Requirements

  1. node >= v12.x
  2. npm >= 6.x

Setup

Step-1:

npm install

Step-2:

Rename .env.example as .env and populate with respective values.

Step-3:

npm start

Available Endpoints

  1. Schedule an Email
curl --location --request GET 'http://localhost:6000/email/v1/schedule' \
--header 'Content-Type: application/json' \
--data-raw '{
    "recipient" : "{{email_address}}",
    "subject" : "{{subject}}",
    "emailBody" : "{{body}}",
    "scheduledDate" : "{{YYYY-MM-DD}}",
    "scheduledTime" : "{{HH:MM}}"
}'
  1. ReSchedule an Email
curl --location --request POST 'http://localhost:6000/email/v1/reschedule' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id" : "{{_object_id_from_mongodb}}",
    "scheduledDate" : "{{YYYY-MM-DD}}",
    "scheduledTime" : "{{HH:MM}}"
}'
  1. Get all pending and scheduled emails
curl --location --request GET 'http://localhost:6000/email/v1/get-status'
  1. Delete a scheduled email
curl --location --request POST 'http://localhost:6000/email/v1/delete' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id" :"5ff194b9fb6298247c161931"
}'

sendemail's People

Contributors

kriston97 avatar

Watchers

 avatar

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.