0

I am using Nodemailer to send e-mails to Etheral for testing-purposes. Everything works fine running locally with 'firebase serve'... When I am deploying it globaly, I get this error every time I try to send an email. I think it comes from Node.js (not Nodemailer's fault) ... I can not figure out why ... I am using the 'free plan'; not paying.

 { Error: getaddrinfo ENOTFOUND smtp.ethereal.email smtp.ethereal.email:587
    at errnoException (dns.js:28:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
  code: 'ECONNECTION',
  errno: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'smtp.ethereal.email',
  host: 'smtp.ethereal.email',
  port: 587,
  command: 'CONN' }

Could this be because I have a free plan; some type of restrictions on the server? Just need a clear answer so I can continue developing...

ravo10
  • 895
  • 9
  • 18

1 Answers1

1

On the free plan Cloud Functions are only allowed to call Google services. Your email server smtp.ethereal.email is not a Google service, so the connection is rejected.

Also see Cloud Functions for Firebase - getaddrinfo ENOTFOUND, which I should probably have closed your question as a duplicate against.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Thank you. Yes, you can close this if you want! Did not find that question when I searched on Google... I will try out the Blaze plan. It looks like for small app's, it is practically free. Very nice. – ravo10 Apr 23 '18 at 10:58
  • Will use this website to search for questions; it is exactly the same almost lol. – ravo10 Apr 23 '18 at 11:02