Socket
Socket
Sign inDemoInstall

pepipost-sdk-nodejs

Package Overview
Dependencies
2
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

pepipost-sdk-nodejs

Pepipost SDK for NodeJS


Version published
Maintainers
1
Created

Readme

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

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc