mailgun-rest

0.3.5 • Public • Published

mailgun-rest

--

Mailgun Nodejs library. It wraps the HTTP api library described here.

Based on the NodeJS HTTP API wrapper of gitlab described here

Maintained by Jens Verbeken.

Install

# Install from npm 
npm install mailgun

Usage

Coffee-Script

# Connection 
mailgun = (require 'mailgun-rest')
  auth: ["api","your_key"]
 
domain = 'your_domain'
 
data =
  "event": "delivered"
 
# Check your stats 
mailgun.stats.retrieveAll domaindata(err, result) ->
  console.log result

Javascript

// Connection
var mailgun = require('mailgun-rest')({
  auth: ["api", "your_key"]
});
 
var domain = 'your_domain'
 
var data = {
  "event": "delivered"
};
 
// check your stats
mailgun.stats.retrieve(domain, data, function(err, result) {
  console.log(result);
});
 

Develop

Install coffee-script globally: 'npm install -g coffee-script'. Edit the Coffee-Script files in src, then build them using cake build. Use cake watch to build files continuously while developing.

Contributors

License

MIT

Changelog

Readme

Keywords

Package Sidebar

Install

npm i mailgun-rest

Weekly Downloads

1

Version

0.3.5

License

MIT

Last publish

Collaborators

  • jensvrai