Created
December 24, 2017 00:38
-
-
Save SamWSoftware/60ecc26ce6789370838e051a4e2fe7ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var api_key = 'key-XXXXXXXXXXXXXXXXXXXXXXX'; | |
var domain = 'www.mydomain.com'; | |
var mailgun = require('mailgun-js')({apiKey: api_key, domain: domain}); | |
var data = { | |
from: 'Excited User <[email protected]>', | |
to: '[email protected]', | |
subject: 'Hello', | |
text: 'Testing some Mailgun awesomeness!' | |
}; | |
mailgun.messages().send(data, function (error, body) { | |
console.log(body); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment