From 4c81921da542b87ed4acd2dc21004d97493ef98c Mon Sep 17 00:00:00 2001 From: Abhishek Gupta Date: Fri, 16 Aug 2024 08:19:08 +0530 Subject: [PATCH] Update mail.js add commiet --- .../ nodemailer/StarterCode/src/utils/mail.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Express/ nodemailer/StarterCode/src/utils/mail.js b/Express/ nodemailer/StarterCode/src/utils/mail.js index 47c7a36..f444c28 100644 --- a/Express/ nodemailer/StarterCode/src/utils/mail.js +++ b/Express/ nodemailer/StarterCode/src/utils/mail.js @@ -2,13 +2,23 @@ import nodemailer from "nodemailer"; const transporter = nodemailer.createTransport({ - host: "smtp.gmail.com", + host: "smtp.gmail.com", // SMTP server hostname port: 465, secure: true, // Use `true` for port 465, `false` for all other ports auth: { - user: "abhishek9661342993@gmail.com", - pass: "pkmc nlkp jmcx mlma", + user: "your email id", // Email address used for authentication + pass: "your password", // Password for the email address + }, }); export default transporter; + +// Where to get password +// 1. Open Gmail +// 2. Click on your profile picture +// 3. Click on manage your google account +// 4 . Search App password and click on it +// 5. It will ask App name Enter any name Ex :- myApp +// 6. It will create a randam password copy it +// 7. and past inside pass pass: "your password", // Password for the email address