Welcome folks today in this blog post we will be sending email
through yahoo
using nodemailer
library in node.js using javascript. All the full source code of the application is shown below.
Get Started
In order to get started you need to make a new node.js
project using the below command as shown below
npm init -y
npm i nodemon
Now we need to go to yahoo
security page which is https://login.yahoo.com/myaccount/security and then you need to create the app
passwords as shown below
And after that you need to make an index.js
file and copy paste the following code
index.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
const nodemailer = require('nodemailer') let transporter = nodemailer.createTransport({ service: 'yahoo', auth: { user: 'geekygautam1997@yahoo.com', pass: 'krzjmkyirghbywbh' } }); transporter.sendMail({ to:"geekygautam1997@gmail.com", from:"geekygautam1997@yahoo.com", subject:"password reset", html:`<p>You requested for password reset</p>` }) |