Created
September 7, 2011 11:42
-
-
Save serby/1200356 to your computer and use it in GitHub Desktop.
Nodemail Example to Hotmail
This file contains 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 | |
nodemailer = require('nodemailer'); | |
nodemailer.sendmail = true; | |
var mail = { | |
subject: 'HTML Email Test', | |
html: '<p>Test <strong>Email</strong></p>', | |
body: 'Test Email', | |
sender: 'test@test.com' | |
}; | |
var emails = [ | |
'someone@hotmail.com']; | |
].forEach(function(email) { | |
console.log('Send email: ' + email); | |
mail.to = email; | |
nodemailer.send_mail(mail, function(error, success) { | |
console.log('Message ' + success ? 'sent' : 'failed'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment