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

759
Views
Nodemailer error (Error: queryA EREFUSED)

sorry for my english

I am using nodemailer and when querying through the api it gives this error:

    Error: queryA EREFUSED smtp.gmail.com
        at QueryReqWrap.onresolve [as oncomplete] (dns.js:210:19) {
      errno: undefined,
      code: 'EDNS',
      syscall: 'queryA',
      hostname: 'smtp.gmail.com',
      command: 'CONN'
    }

My code:

    this.transporter = nodemailer.createTransport({
      service: 'gmail'
      auth: {
        user: mygmail@gmail.com,
        pass: mypass,
      },
})

UPD: I connected the phone to the Internet instead of my LAN cable, checked, everything worked. There was no error, I connected the LAN back, disconnected the phone, this error appeared again

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Make sure that Less secure app access is on in your Gmail account:

Less secure app access > ON

Then fix your code:

this.transporter = nodemailer.createTransport({
  service: "gmail",
  auth: {
    user: email,
    pass: password
  }
});
about 4 years ago · Juan Pablo Isaza Report

0

You can use the built-in service in the Nodemailer and make your code simpler with this one.

this.transporter = nodemailer.createTransport({
  service: 'gmail',
  auth: {
    user: mygmail@gmail.com,
    pass: mypass,
  },
})

Please make sure you have disabled 2-Step verification.

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