Showing timout error
import nodemailer from 'nodemailer'
async function main() {
let transporter = nodemailer.createTransport({
host: "smtp.gmail.com",
port: 465,
secure: true,
auth: {
user: "demoUser1@gmail.com", // Your email address
pass: "doicah*****bwng", // Password (for gmail, your app password)
},
tls: {
rejectUnauthorized: false,
},
});
let info = await transporter.sendMail({
from: 'demouser1@gmail.com',
to: "'demouser2@outlook.com",
subject: "Testing, testing, 123",
html: `
<h1>Hello there</h1>
`,
});
console.log(info.messageId);
}
main()
.catch(err => console.log(err));
I've also tried disabling the windows firewall but no luck...
as i know you must create custom password for gmail to work with 3rd party application in programming. https://shahedbd.medium.com/how-to-setup-gmail-smtp-in-asp-net-b79bf18afe4a
I already did with 2factor authencticaiton
Обсуждают сегодня