简体   繁体   中英

Firebase Backend Node.js Nodmailer 'ENOTFOUND'

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...

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM