1var email_smtp = nodemailer.createTransport({
2 host: "smtp.gmail.com",
3 auth: {
4 type: "login", // default
5 user: "youremail@gmail.com",
6 pass: "PASSWORD_HERE"
7 }
8});
1var email_smtp = nodemailer.createTransport({
2 host: "smtp.gmail.com",
3 auth: {
4 type: "OAuth2",
5 user: "youremail@gmail.com",
6 clientId: "CLIENT_ID_HERE",
7 clientSecret: "CLIENT_SECRET_HERE",
8 refreshToken: "REFRESH_TOKEN_HERE"
9 }
10});