I am getting this in postman -
{
"code": "EAUTH",
"response": "535-5.7.8 Username and Password not accepted. Learn more at\n535 5.7.8
https://support.google.com/mail/?p=BadCredentials x7-
20020aa784c7000000b005058d220b37sm21945855pfn.64 - gsmtp",
"responseCode": 535,
"command": "AUTH PLAIN"
}
Email And password not accepted
, I have already gone through this question, and tried possible way to resolve this problem, but nothing worked out.
nodemailer code section -
let transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
port: 587,
secure: false,
auth: {
user: 'mygmail@gmail.com',
pass: 'mypassword'
}
})
const info = await transporter.sendMail({
from: 'mygmail@gmail.com',
to: "person@gmail.com",
subject: "subject",
text: "text",
html: `<h1> hello </h1>`
})
I have tried -
generate an app-specific password and use that in place of your actual password.
enabled the captcha (link)
enabled the IMAP setting in gmail->setting->Forwarding and POP/IMAP
I Read this - less secure app and google account
Any help would be appreciated.