繁体   English   中英

将 Sendgrid 配置为 SMTP 中继服务器用于 Firebase 身份验证 Email 时出现问题

[英]Problem configuring Sendgrid as SMTP Relay Server for Firebase Authentication Email

社区!

I'm configuring Sendgrid as SMTP for Firebase Authentication Email but when I try to send an email the server sends it with content-type: text/plain

所以HTML内容在用户收到时无法识别

当默认 SMTP Firebase 服务发送 email 内容类型为:多部分/替代ZFC35FDC70D5FC69D5386

那么,为什么我需要更改默认的 SMTP firebase 服务?

基本上,因为当 SMTP firebase 服务设置为发件人时,一些电子邮件没有收到良好的声誉,所以它们被识别为垃圾邮件,所以这就是为什么我需要将 ZC2239A92BDE29F0A09F917319C3 服务更改为 SendFEGrid.ZCC3 服务

当前 Firebase SMTP 配置

我查看了 SendGrid 文档,但没有找到有用的资源来解决这个问题。

我很欣赏任何想法。

FIREBASE/MAILGUN HTML 设置

  1. Go 到https://developers.google.com/oauthplayground
  2. 在“第 1 步”下,select“ Firebase 动态链接 API v1 ”为 Z31A1ZEFD1240BE4BEF2ECD81
  3. 单击“授权 API ”并登录与您的 Firebase 应用关联的 Google 帐户
  4. 在“第 2 步”下,点击“兑换代币授权码
  5. 在“步骤 3”下,将 HTTP 方法更改为PATCH
  6. 输入请求 URI https://identitytoolkit.googleapis.com/admin/v2/projects/*{FIREBASE_PROJECT_ID}*/config?updateMask=notification.sendEmail.resetPasswordTemplate.bodyFormat (在其中添加您的项目 ID!)
  7. 点击“输入请求正文”并输入{notification:{sendEmail:{resetPasswordTemplate:{bodyFormat: "HTML"}}}} ,然后点击底部的“关闭”。
  8. 点击“发送请求

如果您在响应中获得HTTP/1.1 200 OK ,则工作完成。 您现在可以使用 Sendgrid、Mailgun 或任何其他 email 服务使用 Firebase 发送 HTML 电子邮件!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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