This is a simple Express.js application that demonstrates how to use Nodemailer for sending emails.
-
Clone this repository:
git clone https://github.com/ali-eljerrari/nodemailer-app.git
-
Navigate into the project directory:
cd nodemailer-app
-
Install dependencies:
npm install or yarn install
-
Open the
./src/app.ts
file and update themailOptions
object with your email configuration details such asservice
,user
,pass
,from
, etc. -
If you are using a service like Gmail, you may need to allow less secure apps to access your account. Alternatively, you can set up an app-specific password.
-
Start the application:
npm run dev
-
Open your web browser and navigate to
http://localhost:3000
. -
Fill out the form and click "Send Email" to send a test email.
- Express.js: Fast, unopinionated, minimalist web framework for Node.js.
- Nodemailer: Module for Node.js applications to allow easy as cake email sending.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize it further based on your specific application's features and requirements.