Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

231
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda