Created
September 3, 2017 10:40
-
-
Save indriApollo/1f18bf4939c9b26efd03512dd33c0d0c 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
#!/usr/bin/env node | |
const nodemailer = require("nodemailer"); | |
let smtpConfig = { | |
host: 'smtp.gmail.com', | |
port: 587, | |
secure: false, // upgrade later with STARTTLS | |
auth: { | |
user: '[email protected]', | |
pass: 'xxx' | |
} | |
}; | |
let transporter = nodemailer.createTransport(smtpConfig); | |
transporter.sendMail({ | |
from: '[email protected]', | |
to: '[email protected]', | |
subject: 'Message title', | |
text: 'Plaintext version of the message' | |
}, function(err, info) { | |
console.log(err); | |
console.dir(info); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment