Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

229
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!