mailing caught error Error: getaddrinfo ENOTFOUND smtp.example.com

See original GitHub issue

Describe the bug Not able to get the test server to force send with the correct config settings, maybe im missing something. I tried changing /emails/index.ts transport, but still getting the following error.

mailing caught error Error: getaddrinfo ENOTFOUND smtp.example.com

even with /emails/index.ts config

const transport = nodemailer.createTransport({
  host: 'smtp.mailtrap.io',
  port: 2525,
  auth: {
    user: 'username',
    pass: 'password'
  }
});

To Reproduce Steps to reproduce the behavior:

I must be missing a config step, but i updated the transport config in the /emails/index.ts, and when I run npx mailing, then send

  1. run npx mailing to init project inside nextjs app
  2. change the config in emails/index.ts in transport ensuring host is different
  3. restart mailing server
  4. trigger send email within main nextjs app so it gets intercepted by mailing server
  5. Click on ‘Force send’
  6. See error
mailing caught error Error: getaddrinfo ENOTFOUND smtp.example.com

Expected behavior To send email to mailtrap

I was able to get it to send within the main nextjs app by doing
dangerouslyForceDeliver: true inside sendMail

Any help would be appreciated

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
psugiharacommented, Nov 8, 2022

fixed in 0.8.15

thanks @SSardorf and @crushingCodes for finding this!

1reaction
SSardorfcommented, Nov 8, 2022

I’m having the same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nodemailer getaddrinfo ENOTFOUND Error - Stack Overflow
Try stop using gmail service and set it up like any other smtpTransport like the following. var smtpTransport = nodemailer.
Read more >
getaddrinfo ENOTFOUND · Issue #409 · nodemailer ... - GitHub
ENOTFOUND means that the app was not able to resolve DNS A record for smtp.gmail.com. Probably something wrong with your DNS server. This...
Read more >
Node.js Error Message “getaddrinfo ENOTFOUND localhost ...
If you try to run your JSON server and see this error message “getaddrinfo ENOTFOUND localhost,” it's happening because Webpack cannot find your...
Read more >
nodemailer/nodemailer - Gitter
i don't know this responce { Error: getaddrinfo ENOTFOUND stmp.gmai.com ... I tried sending emails in bulk using Smtp Gsuite, but I got...
Read more >
HTTP Node throws getaddrinfo ENOTFOUND - Questions - n8n
Normally that error would suggest a network problem possibly DNS related. When you see the error in the UI / console does it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found