通过 Discourse API 接收电子邮件的代码

Hello Discourse,

Is there a preexisting code base out there for pushing emails to Discourse’s incoming email API?

Thanks,
Andrew

From the output of rake routes You can send a POST request to

admin/email/handle_mail

Here is the controller method from handle_mail:

对于非技术用户,我需要了解通过 API 接收邮件的功能:

我已完成的工作:

  • 通过 POP3 轮询主域名(非子域名)接收邮件
  • 通过 postfix 邮件模块实现了邮件接收,但这仅适用于子域名——在我的情况下是 xxx@community.eleoptics.com——而我们无法使用子域名,需要主域名。

当前设置:

  • 接收邮件:G Suite Google “Groups” 邮箱地址转发到免费的 Gmail 账户(以避免为每个邮箱地址支付 Gsuite 费用)。使用 POP3 轮询。
  • 发送邮件:通过 GSuite 进行 SMTP 中继转发,由部署在 Google Cloud 上的 Discourse 服务器 IP 验证。

这虽然可行,但我希望摆脱使用免费 Gmail 账户进行 POP3 轮询的方案。

我们计划使用 Google Cloud Platform 的 Email API 来处理邮件收发,以支持更大规模的部署和服务。

请问哪里可以找到我可以发给技术员工的文档,说明如何直接将接收邮件功能集成到 Discourse?

如果上述帖子中已经包含相关链接,那非常感谢。否则,我认为可能需要更具体、更有上下文的解释。