New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

send-rest

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

send-rest

A Simple API to schedule Email / SMS / Webhooks

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

https://send.rest Alt text Please note: Templates are stored on send.rest

var send = require("send-rest");

send.email({
    template : "hackernews",
    subject: "Greetings #{name}",
    params : { "name" : "Johnatthan" }
}).to("user@gmail.com").from("f1@company.io").done(function(err,ing){
    if(err) {
        console.log("err");
    }
    else console.log(ing);
});

send.email({
    template : "hackernews",
    subject: "Greetings #{name}",
    params : { "name" : "Sean" }
}).future({
    when : "in 1 day", // send everyday
    dieout : 60, // for next 60 days
    start : "in 2 hours", // start job in 2 hours
    now : false // dont send now
}).to("user@gmail.com").from("f1@company.io").done(function(err,ing){
    console.log(ing);
});

#####Methods send.delete

send.email.to.from.future.done
send.email.to.from.done

send.log.to.from.future.done
send.log.to.from.done

send.sms.to.from.future.done
send.sms.to.from.done

send.webhook.to.from.future.done
send.webhook.to.from.done

Email/Log/SMS/Webhook accepts following parameters
    template 
        // template name on send.rest
    subject 
        // subject 
    params 
        // parameters in subject and template
    api 
        // API in har1.2 format will be called and variables will be replaced in template

future accepts following parameters
    when
        // array or string value, support chrono format
    dieout
        // how many times job should run
    start
        // after how much time job should start
    now
        // is sending now required

FAQs

Package last updated on 14 Feb 2018

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