Created
June 6, 2020 10:33
-
-
Save tetrashine/79c1a058707661b0ea75622075fc879e to your computer and use it in GitHub Desktop.
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
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