You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pepipost-sdk-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pepipost-sdk-nodejs

Pepipost SDK for NodeJS

0.4.0
latest
npmnpm
Version published
Weekly downloads
5.8K
24.4%
Maintainers
1
Weekly downloads
 
Created
Source

Pepipost SDK for NodeJS

This SDK was semi-automatically generated by APIMATIC v2.0. Thanks to APIMATIC

Installation

npm install pepipost-sdk-nodejs

Usage

create a file example.js and put the below code

example.js

var PepipostSDK = require('pepipost-sdk-nodejs');

var Email = PepipostSDK.EmailController;

var data = {
    "api_key": "yoursecretapikey",
    "email_details": {
        "fromname": "yourfromname",
        "subject": "this is test email subject",
        "from": "from@example.com",
        "content": "<p> hi, this is a test email sent via Pepipost JSON API.</p>"
    },
    "recipients": [
        "recipient@example.com"
    ]
};

Email.send(data,callback_mail_sent);

function callback_mail_sent(err_msg,parsed,context){
    if(parsed.errorcode==0){
        console.log("mail sent successfully.\n");
    }
    else{
        console.log("Email sent Failed.\n");
        console.log("errormessage("+parsed.errormessage+")\n");
        console.log("errorcode("+parsed.errorcode+")\n");
    }    
}

Change the "yoursecretkey" with your API key and example.com with your approved domain name. To get your api key you need to signup/register on Pepipost

nodejs example.js

FAQs

Package last updated on 23 Aug 2016

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