# Sending email failed with SMTPS port 465

**URL:** <https://meta.discourse.org/t/sending-email-failed-with-smtps-port-465/65787>\
**Category:** Self-hosting\
**Created:** [2017年七月7日 05:07 UTC](https://meta.discourse.org/t/sending-email-failed-with-smtps-port-465/65787 "2017-07-07T05:07:43Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Godmar\_Back](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/godmar_back/32/206246_2.png) [@Godmar\_Back](https://meta.discourse.org/u/Godmar_Back)\
**Post date:** [2021年一月15日 20:00 UTC](https://meta.discourse.org/t/sending-email-failed-with-smtps-port-465/65787/10 "2021-01-15T20:00:23Z")

</div>

我认为以下内容与此相关：一个关于 Ruby 的 Action Mailer 的 [未完成的 PR](https://github.com/rails/rails/pull/30483) 描述了如何配置 Action Mailer。具体来说，需要添加 `tls` 和 `ssl` 选项。在 Discourse 中，这可以放在 production.rb 的 [此处](https://github.com/discourse/discourse/blob/master/config/environments/production.rb#L28-L36)。

附注：我已提交了一个 [包含建议修复方案的 PR](https://github.com/discourse/discourse/pull/11733)，该方案也可用作临时解决方案。

---

_[View the full topic](https://meta.discourse.org/t/sending-email-failed-with-smtps-port-465/65787)._
