Before running this project, ensure you have the following installed:
- Node.js and npm (Node Package Manager)
- Gmail account with 2FA enabled
- An "App Password" generated for your Gmail account for use with nodemailer
-
Clone the repository:
git clone https://github.com/juma-h/nodemailer-gmail.git
-
Navigate into the project directory:
cd nodemailer-gmail
-
Install Dependencies
npm install
-
Replace the process.ENV.labels with :
// the email you used to register the app user: process.env.GMAIL_USER, // your app password pass: process.env.GMAIL_PASSWORD, // the email you want to receive emails to: process.env.GMAIL_TO,
- This application uses a basic setup. For production use, consider implementing additional security measures and error handling.
- Ensure your Gmail account has less secure app access enabled or use an app password to authenticate with Nodemailer.
This project is licensed under the MIT License - see the LICENSE file for details.