Posts

Showing posts from January, 2022

How to send 'Forgot Password' mail using Node.js and Gmail API - EHB

Image
There are many ways to achieve this task, but here we will be using Gmail API and Node.js. Because almost everyone has a Gmail account, it will be easy for everyone to implement it. Here we will be using OAuth2 and nodemailer npm package. To create a program that sends mail to users, you have to go through the following steps: Step 1:-Create a folder named email-notification, and in this, create the "app.js" file. Step 2:- Initialize npm using the "npm init -y" command. Step 3:- Install the "nodemailer" and "googleapis" npm packages. Use the " npm i nodemailer googleapis " command in the terminal. Step 4:- Go to " https://console.cloud.google.com/ " If you have a google account, you will automatically log in when you visit this website. Step 5:- Create a new project. Click on where "My First Project" is written and then " new project " you can also search for " create a project ...