Skip to content

Instantly share code, notes, and snippets.

@iskenxan
Created April 21, 2019 17:37
Show Gist options
  • Save iskenxan/950b3f7c16b7681e0c7300ed7436cde5 to your computer and use it in GitHub Desktop.
Save iskenxan/950b3f7c16b7681e0c7300ed7436cde5 to your computer and use it in GitHub Desktop.
const mailgun = require('mailgun-js')({
apiKey: api_key,
domain: domain
});
const EmailStrategy = {
send: function(receiptHtml, userEmail) {
const emailBody = getEmailBody(receiptHtml, userEmail);
mailgun.messages().send(emailBody, function (error, body) {
console.log(body);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment