Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rexfng/send

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rexfng/send

send email with restful api

  • 1.3.4
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-96.15%
Maintainers
1
Weekly downloads
 
Created
Source

Description

wrapper of sendgrid and various messaging methods to send email, text messages, and make phone calls

Initialize

  1. define enviornment variable EMAIL_PASS by sendgrid api_key
const Send = require('@rexfng/send')
const email = Send.helpers.email

Helper Methods

//returns helpers which can be used for sending emails. Method returns a promise.

const Send = require('@rexfng/send')
const email = Send.helpers.email
email({
    from: "John<john@example.com>", // sender address
    to: "Paul<paul@example.com>", // list of receivers
    subject: "Welcome Message", // Subject line
    text: "Welcome to our service.", // plain text body
    html: "<h1>Welcome to our service.</h1>" // html body
})
	

Router Methods

//returns routes which can be used with express ex.
const express = require('express')
app = express();
app.listen(3000);
const Send = require('@rexfng/send')
const email = Send.routes.email
app.use('/', email) 

// POST to "/email" with body JSON

	

FAQs

Package last updated on 22 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc