Encountering this issue in Postman:
{
"code": "EAUTH",
"response": "535-5.7.8 Username and Password not accepted. More information available 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 attempted various solutions to fix the issue, but none have been successful.
Nodemailer code snippet:
let transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
port: 587,
secure: false,
auth: {
user:'<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a7cadec0cac6cecbe7c0cac6cecb89c4c8ca">[email protected]</a>',
pass: 'mypassword'
}
})
const info = await transporter.sendMail({
from:'<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4c21352b212d25200c2b212d2520622f2321">[email protected]</a>',
to: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c4b4a1b6b7abaa84a3a9a5ada8eaa7aba9">[email protected]</a>",
subject: "subject",
text: "text",
html: `<h1> hello </h1>`
})
Steps taken:
Generated an app-specific password and substituted it for the actual password.
Enabled captcha (link)
Enabled IMAP setting in Gmail->Settings->Forwarding and POP/IMAP
Referenced less secure app and Google account
Any assistance will be greatly appreciated.