# 对等方连接重置错误 - SendGrid

**URL:** https://meta.discourse.org/t/connection-reset-by-peer-error-sendgrid/255513
**Category:** Self-hosting
**Tags:** email
**Created:** [2023年二月17日 20:12 UTC](https://meta.discourse.org/t/connection-reset-by-peer-error-sendgrid/255513 "2023-02-17T20:12:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zgy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zgy/32/294081_2.png) [@zgy](https://meta.discourse.org/u/zgy)
#### Post date: [2023年二月17日 20:12 UTC](https://meta.discourse.org/t/connection-reset-by-peer-error-sendgrid/255513/1 "2023-02-17T20:12:42Z")

</div>

每次 Discourse 尝试发送电子邮件时，我都会收到一个通用的“作业异常 - 连接被对端重置”错误。我知道这个错误与当前托管它的服务器的某些设置有关，因为我在另一台服务器上尝试了完全相同的 Discourse Docker 安装/电子邮件设置，并且它立即奏效了。有人能帮我弄清楚在新服务器上应该更改什么才能发送电子邮件吗？它目前同时打开了 443 和 80 端口。

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2023年二月17日 23:16 UTC](https://meta.discourse.org/t/connection-reset-by-peer-error-sendgrid/255513/2 "2023-02-17T23:16:12Z")

</div>

您的服务器可能阻止了出站端口 25。

请尝试将出站 SMTP 端口设置为端口 2525。

---

<div class="post-metadata">

### Author: ![zgy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zgy/32/294081_2.png) [@zgy](https://meta.discourse.org/u/zgy)
#### Post date: [2023年二月18日 18:32 UTC](https://meta.discourse.org/t/connection-reset-by-peer-error-sendgrid/255513/3 "2023-02-18T18:32:11Z")

</div>

在我的配置中，我使用的是端口 587，并且在我的服务器上已打开，我使用以下命令进行了测试：

> `telnet smtp.sendgrid.net 587`
