has anyone gotten mailgun-js node-module working?
I’m struggling and can really use a quick example.
Here’s what I got (not working):
import {mailgun} from ‘mailgun-js’;
const api_key = ‘###########’;
const domain = ‘mydomain.org’;
const mg = new mailgun({apiKey: api_key, domain: domain});
var data = { from : ‘from@sender.org’
to: ‘to@receiver.org’,
subject: ‘Hello’,
html: ‘test msg’
};
mg.messages().send(data, function (error, body) {
console.log(body);
});