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

232
Vistas
I'm trying to send email with the mailer and nestjs

I'm trying to send email with the mailer and nestjs. The error it gives:

ErrorError: Invalid login: 535-5.7.8 Username and Password not accepted. learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials w5sm528203qko.34 - gsmtp 

Installed the module following this link

My app.module.ts I add:

MailerModule.forRoot({
      transport: 'smtps://rafaelribeirosouza86@gmail.com:password@smtp.gmail.com',
      defaults: {
        from: '"nest-modules" <rafaelribeirosouza86@gmail.com>',
      }
    })

My service:

await this.mailerService
      .sendMail({
        to: createCatDto.email, // list of receivers
        from: 'rafaelribeirosouza86@gmail.com', // sender address
        subject: 'Novo password', // Subject line
        text: 'Sua nova senha é:'+createCatDto.senhaNormal // plaintext body
        //html: '<b>welcome</b>', // HTML body content
      })
      .then(() => {})
      .catch((error) => {console.log("Error"+error)});

Remembering that nestjs is an api for android and in the api I'm trying to send email

about 4 years ago · Juan Pablo Isaza
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