Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mailgun-js

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailgun-js - npm Package Compare versions

Comparing version 0.3.5 to 0.4.2

bin/docs

2

LICENSE.txt
(The MIT License)
Copyright (c) 2012 OneLobby <http://www.onelobby.com>
Copyright (c) 2012 - 2014 OneLobby <http://www.onelobby.com>

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining

var api_key = 'key-8jfyvg-hmaluaz28r74hr0l187ky2zz0';
var domain = 'onelobby.mailgun.org';
var Q = require('q');
var fs = require('fs');
var path = require('path');
var qs = require('querystring');
var Mailgun = require('./lib/mailgun');
var auth = require('./test/auth.json');
var fixture = require('./test/fixture.json');

@@ -10,24 +15,50 @@ //var mailgun = require('./mailgun')(auth.api_key, auth.domain);

var data = {
var filepath = path.join(__dirname, '/LICENSE.txt');
var filepat2 = path.join(__dirname, '/test/fixture.json');
var filepath3 = path.join(__dirname, 'package.json');
var file1 = fs.readFileSync(filepath);
var file2 = fs.readFileSync(filepat2);
var attch = new Mailgun.Attachment(file1, '/LICENSE.txt');
var sendData = {
from: 'Excited User <me@samples.mailgun.org>',
to: 'dbojan@gmail.com',
subject: 'Hello',
text: 'Testing some Mailgun awesomness!'
text: 'Testing some Mailgun awesomness!',
attachment: [attch, file2, filepath3]
};
mailgun.get('/stats', {event: 'sent' }, function (err, body) {
mailgun.messages().send(sendData).then(function (body) {
//if (err) console.log(err);
console.log(body);
});
/*mailgun.mailboxes().update({mailbox: 'samplemailbox'}).then(function (body) {
/*mailgun.get('/stats', { event: ['sent', 'delivered'] }, function (err, body) {
console.log(body);
}, function (err) {
console.log('err');
console.log(err);
});*/
/*mailgun.unsubscribes().list().then(function (body) {
console.log(body);
}, function(err) {
console.log(err);
});*/
/*mailgun.lists().create(fixture.mailingList, function (err, body) {
var list = mailgun.lists(fixture.mailingList.address);
var p1 = list.info();
var bob = {
subscribed: true,
address: 'bob@gmail.com',
name: 'Bob Bar',
vars: {age: 26}
};
var p2 = list.members().create(bob);
var p3 = list.members().list();
Q.all([p1, p2, p3]).done(function () {
console.log("Done!");
});
});*/

@@ -8,3 +8,3 @@ {

"keywords": ["email", "mailgun"],
"version": "0.3.5",
"version": "0.4.2",
"homepage": "https://github.com/1lobby/mailgun-js",

@@ -22,3 +22,9 @@ "license": "MIT",

},
"main": "./mailgun.js",
"main": "./lib/mailgun.js",
"dependencies": {
"form-data": "~0.1.2",
"inflection": "~1.2.6",
"path-proxy": "~1.0",
"q": "~1.0.1"
},
"devDependencies": {

@@ -25,0 +31,0 @@ "mocha": "*"

Sorry, the diff of this file is not supported yet

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