Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tetrashine/715b4ac188340cffe2f4af268c2f0586 to your computer and use it in GitHub Desktop.
Save tetrashine/715b4ac188340cffe2f4af268c2f0586 to your computer and use it in GitHub Desktop.
const nodemailer = require("nodemailer");
let transporter = nodemailer.createTransport({
service: 'Gmail',
auth: {
type: 'OAuth2',
user: '[your email]',
clientId: '',
clientSecret: '',
refreshToken: '',
accessToken: ''
}
});
let info = transporter.sendMail({
to: '[target email]',
subject: "Test Subject",
text: `Test Email`,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment