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

sailthru-client

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sailthru-client

Node.js client for Sailthru API

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.4K
increased by4.19%
Maintainers
1
Weekly downloads
 
Created
Source

sailthru-node-client

A simple client library to remotely access the Sailthru REST API as per http://docs.sailthru.com/api

Installation

npm install sailthru-client

Examples

Initialization

var apiKey = '******',
    apiSecret = '*****',
    sailthru = require('sailthru-client').createSailthruClient(apiKey, apiSecret);

send

//send
var template = 'my-template',
    email = 'praj@sailthru.com',
    options = {
        'vars': {
            'name': 'Prajwal Tuladhar',
            'address': 'Queens, NY'
        },
        'options': {
            'test': 1,
            'replyto': 'praj@infynyxx.com'
        }
    };
sailthru.send(template, email, function(response, err) {
    if (err) {
        console.log("Status Code: " + err.statusCode);
        console.log("Error Code: " + err.error);
        console.log("Error Message: " + err.errormsg);
    } else {
        //process output
    }
}, options);

//multi-send
var emails = ['praj@sailthru.com', 'ian@sailthru.com', 'will@sailthru.com'],
    template = 'multi-template',
    options = {
        'options': {
            'test': 1
        }
    };
sailthru.multiSend(template, emails, function(response, err) {
    if (err) {
        //Process error
    } else {
        //process JSON output
    }
}, options);

FAQs

Package last updated on 14 Aug 2011

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