通过 firebase 函数发送电子邮件

Sending E-Mail through firebase functions

有办法使用 API like(sendgrid, mailgun) 通过 Firebase 云函数发送电子邮件 或者它被视为出站连接?

假设您询问是因为您使用的是免费的 Firebase 计划。如 Firebase pricing page 中所述:

The Spark plan allows outbound network requests only to Google-owned services.

幸运的是,有一个 Google 拥有的服务可以发送邮件;邮箱!有一个quick-start sample available or a related Whosebug answer,但该方法有以下限制:

You may see this message if you send an email to a total of more than 500 recipients in a single email and or more than 500 emails in a day sent.

没有 Google 拥有的邮件 API 允许无限制的电子邮件。正如上面链接的快速入门示例所述:

If you are planning on sending a large number of emails you should use a professional email sending platform such as Sendgrid, Mailjet or Mailgun.