Created
March 7, 2016 13:41
-
-
Save andrewjmead/32fb7dba05120f356b5a to your computer and use it in GitHub Desktop.
Sarvesh - Send email
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 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