Last active
August 29, 2015 14:05
-
-
Save hamishdickson/ea4b55ec257e639d1452 to your computer and use it in GitHub Desktop.
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 smtpTransport = nodemailer.createTransport({ | |
service: 'service', | |
auth: { | |
user: 'username', | |
pass: 'password' | |
} | |
}); | |
var mailOptions = { | |
from: '[email protected]', | |
to: '[email protected]', | |
subject: 'Email subject', | |
text: 'This is the main email body' | |
}; | |
smtpTransport.sendMail(mailOptions, function (error, response) { | |
if (error) { | |
console.log('Error sending email' + error); | |
} else { | |
console.log('Email sent!'; | |
} | |
smtpTransport.close(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment