0

I use Nodemailer to send emails with Node.js, and I use their test account feature (ethereal email) for automated testing. This was working perfectly but now, with no changes to the code, I get the following error:

{ 
  "code": "ECONNRESET",
  "path": null,
  "host": "api.nodemailer.com",
  "port": 443,
  "type": "FETCH",
  "sourceUrl": "https://api.nodemailer.com/user"
}

I narrowed it down and the error is definitely coming from the nodemailer.createTestAccount() function.

It indicates a connection problem, but my internet connection is fine and the error persists even after disabling my VPN and ad/tracker blocking.

Nodemailer doesn't have an API status page as far as I could see, so it may or may not be an issue on their end.

I call the function every single time I need to test email sending, so about once every second during testing. I could try manually generating a test account once and then always using those credentials for every test, but I'd prefer to avoid that if possible. The Nodemailer blog says this is okay: https://blog.nodemailer.com/2017/08/28/ethereal-email-testing/

Is anyone else having this problem? Any help would be appreciated.

2 Answers2

2

Turns out that Ethereal Email, the service Nodemailer uses for test emails, is down:

This is most likely the issue.

1

had the same issue with Ethereal, switched to Mailtrap for local testing, it works well and it is easy to set up

Željko Šević
  • 3,743
  • 2
  • 26
  • 23
  • I had an issue with Etheral giving me `Error: Unexpected socket close` all of a sudden, even though it worked the day before. Might be that some service is down, but I switched to Mailtrap and solved it. – Nifel Mar 06 '22 at 08:38