Skip to content

Instantly share code, notes, and snippets.

@andrewjmead
Created March 7, 2016 13:41
Show Gist options
  • Select an option

  • Save andrewjmead/32fb7dba05120f356b5a to your computer and use it in GitHub Desktop.

Select an option

Save andrewjmead/32fb7dba05120f356b5a to your computer and use it in GitHub Desktop.
Sarvesh - Send email
var sendEmail = function(email) {
var email = {
"From": email.From,
"To": email.To,
"Subject": email.Subject,
"TextBody": email.TextBody
}
client.sendEmail(email, function(error, success) {
return new Promise(function(resolve, reject) {
if (error) {
return reject(error.message);
console.error("Unable to send via postmark: " + error.message);
} else {
return resolve(success);
}
});
});
}
module.exports.sendEmail = sendEmail;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment