【问题标题】:Firebase Backend Node.js Nodmailer 'ENOTFOUND'Firebase 后端 Node.js Nodmailer 'ENOTFOUND'
【发布时间】:2018-04-23 02:28:15
【问题描述】:

我正在使用 Nodemailer 向 Etheral 发送电子邮件以进行测试。使用“firebase serve”在本地运行一切正常...当我在全球部署它时,每次尝试发送电子邮件时都会收到此错误。我认为它来自 Node.js(不是 Nodemailer 的错)......我不知道为什么......我正在使用“免费计划”;不付钱。

 { 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' }

这可能是因为我有免费计划吗?服务器上的某种类型的限制?只需要一个明确的答案,这样我就可以继续开发......

【问题讨论】:

    标签: javascript node.js firebase google-cloud-functions nodemailer


    【解决方案1】:

    在免费计划中,Cloud Functions 只允许调用 Google 服务。您的电子邮件服务器 smtp.ethereal.email 不是 Google 服务,因此连接被拒绝。

    另请参阅Cloud Functions for Firebase - getaddrinfo ENOTFOUND,我可能应该将您的问题作为重复项关闭。

    【讨论】:

    • 谢谢。是的,如果你愿意,你可以关闭它!当我在谷歌上搜索时没有找到那个问题......我将尝试 Blaze 计划。它看起来像小应用程序,它实际上是免费的。非常好。
    • 将使用本网站搜索问题;几乎完全一样,哈哈。
    猜你喜欢
    • 2013-07-15
    • 1970-01-01
    • 2022-01-09
    • 2019-03-14
    • 2018-05-18
    • 1970-01-01
    • 1970-01-01
    • 2019-03-05
    相关资源
    最近更新 更多