Search code examples
node.jsconnectionnodemailereconnreset

Nodemailer: createTestAccount() fails with ECONNRESET error


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.


Solution

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

    This is most likely the issue.