Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

434
Vistas
NodeMailer - Username and Password not accepted

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.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You can not login to the smtp server using a login and password anymore. You could try using an apps password but as Less secure apps & your Google Account is being removed shortly this is probably not the best option.

enter image description here

I recommend looking into Xoauth2 this way you can authorize the user rather than relying upon their password. I would try adapting javascript-implicit-flow to see if this will work.

about 4 years ago · Juan Pablo Isaza Denunciar

0

  • First, You need to use a valid Gmail account with your credentials.
  • You need to allow less secure apps from your google account to send emails. Through this link. Allow less secure apps From your Google Account

const nodemailer = require('nodemailer');

const sendEmail = async () => {
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
  user: 'sender gmail',
  pass: 'sender password',
  },
});

const options = {
from: 'sender gmail',
to: 'receiver gmail',
subject: 'subject',
text: 'text',
};

await transporter.sendMail(options);
}; 

module.exports = sendEmail;
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda