Send mail in node js using nodemailer library.We have provide send mail demo api like- send mail by nodemailer api.
What we have implemented in this project?
- Sending mail via emailId and password
- A single module with zero dependencies – code is easily auditable, as there are no dark corners
- Heavy focus on security, no-one likes RCE vulnerabilities
- Unicode support to use any characters, including emoji 💪
- Windows support – you can install it with npm on Windows just like any other module, there are no compiled dependencies. Use it hassle free from Azure or from your Windows box
- Use HTML content, as well as plain text alternative
- Add Attachments to messages
- Embedded image attachments for HTML content – your design does not get blocked
- Secure email delivery using TLS/STARTTLS
- Different transport methods in addition to the built-in SMTP support
- Sign messages with DKIM
- Custom Plugin support for manipulating messages
- Sane OAuth2 authentication
- Proxies for SMTP connections
- ES6 code – no more unintentional memory leaks, due to hoisted var’s
- Autogenerated email test accounts from Ethereal.email
Node is installed (v 16.16.0)
npm is installed (v 8.11.0)
mongodb is installed
Git is installed
Express
Understanding of rest api
Idea for working in backend technology.
Go to the pre-start folder and env>development.env file directory
NODE_ENV=development
jwt_secret_key=""
MONGO_URI=""
Api path - src/controllers/customer/
Express
Mongoose
Dotenv
Bcryptjs
nodemailer: npm install nodemailer
use mongodb so go to mongodb create the cluster and get the url from connection and add in .env file.
DB_URL = "****"
PORT=3009
HOST=localhost
npm install
npm run start:dev
npm run build
node dist/index.js
{{Your Ip}}/api/v1/mailer/senaMailByMailer