# 无法发送电子邮件 - 端口 465 出现问题

**URL:** <https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [2022年十一月18日 04:11 UTC](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004 "2022-11-18T04:11:29Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [2022年十一月20日 04:37 UTC](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004/10 "2022-11-20T04:37:07Z")

</div>

> [@RGJ](#):
>
> 嗯，如果 @schungx 能够确认 `DISCOURSE_SMTP_FORCE_TLS=true` 确实是解决方案，我们可以添加它。

我马上试试！

编辑：@RGJ 我可以确认在 `app.yml` 中设置 `DISCOURSE_SMTP_FORCE_TLS: true` 成功解决了问题！ 🍾

我建议添加一个醒目的警告，说明 **如果您使用端口 465，请设置 `DISCOURSE_SMTP_FORCE_TLS: true`** ，或者 Discourse 不应该足够智能地检测到这一点吗？

---

_[View the full topic](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004)._
