2.1.2 • Published 6 years ago

mailhops v2.1.2

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

MailHops API node

www.MailHops.com

Build Status NPM version

A nodejs module for interacting with the MailHops API.

Getting Started

Installation

$ npm install mailhops

Configuration

Simply require the mailhops module, instantiate a new MailHops object.

New MailHops objects can be instantiated with configuration parameters. Here is an example:

var MailHops = require("mailhops");
var mailhops = new MailHops({
    api_key: "aWN8Pb27Xj6GfV8D6ARsjokonYwbWUNbz9rM",
    api_version: 2,
    proxy: "http://myproxy:3128",
    app_name: "Node App v2.0.1",
    forecastio_api_key: ""
});

MailHops objects can also be configured via the .configure(options) method. Here is an example:

var MailHops = require("mailhops");
var mailhops = new MailHops();

var options = {
    api_key: "aWN8Pb27Xj6GfV8D6ARsjokonYwbWUNbz9rM"
}

mailhops.configure(options);

// get IPs from a full header where headerText is the full header
var ips = mailhops.getIPsFromHeader(headerText);

// or pass in an array of IP addresses
var ips = ['216.58.217.46','98.138.253.109'];

mailhops.lookup(ips,function(err, res, body){
  if(err)
    console.log('MailHops Error',err);
	console.log(body);
});

var mapUrl = mailhops.mapUrl('216.58.217.46,98.138.253.109');

Running Tests

$ npm test

Other MailHops projects

2.1.2

6 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

8 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago