Skip to content

Instantly share code, notes, and snippets.

@serby
Created September 7, 2011 11:42
Show Gist options
  • Save serby/1200356 to your computer and use it in GitHub Desktop.
Save serby/1200356 to your computer and use it in GitHub Desktop.
Nodemail Example to Hotmail
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