# 新安装中出现邮件错误

**URL:** https://meta.discourse.org/t/mail-error-on-fresh-installation/350375
**Category:** Support
**Tags:** docker
**Created:** [2025年二月4日 07:06 UTC](https://meta.discourse.org/t/mail-error-on-fresh-installation/350375 "2025-02-04T07:06:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![newbie-on-discourse1](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@newbie-on-discourse1](https://meta.discourse.org/u/newbie-on-discourse1)
#### Post date: [2025年二月4日 07:06 UTC](https://meta.discourse.org/t/mail-error-on-fresh-installation/350375/1 "2025-02-04T07:06:13Z")

</div>

大家好  
我的邮件设置出现了一个错误。

```plaintext
  DISCOURSE_SMTP_ADDRESS: smtp.strato.de
  DISCOURSE_SMTP_PORT: 465
  DISCOURSE_SMTP_USER_NAME: discourse@domain.net
  DISCOURSE_SMTP_PASSWORD: REDACTED_PASSWORD
  # DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
  #DISCOURSE_SMTP_DOMAIN: discourse.example.com # (required by some providers)
  #DISCOURSE_NOTIFICATION_EMAIL: noreply@discourse.example.com # (address to send notifications from)

```

使用 docker-doctor 时，我得到：

```plaintext

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [admin.discourse@domain.net]: test-dj0qyymtu@srv1.mail-tester.com
Sending mail to test-dj0qyymtu@srv1.mail-tester.com. . .
Testing sending to test-dj0qyymtu@srv1.mail-tester.com using smtp.strato.de:465, username:discourse@domain.net with plain auth.
======================================== ERROR ========================================
                                    UNEXPECTED ERROR

Net::ReadTimeout

====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!

Please report the exact error message above to https://meta.discourse.org/
(And a solution, if you find one!)
=======================================================================================
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

```

希望有人能帮帮我。我非常喜欢这个产品，并希望为我的社区使用它 \<3

---

<div class="post-metadata">

### Author: ![newbie-on-discourse1](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@newbie-on-discourse1](https://meta.discourse.org/u/newbie-on-discourse1)
#### Post date: [2025年二月4日 08:40 UTC](https://meta.discourse.org/t/mail-error-on-fresh-installation/350375/2 "2025-02-04T08:40:11Z")

</div>

也许我需要更改 SMTP 身份验证的身份验证方式。但我该如何操作呢？我找不到相关的帖子来解答这个问题。

有人能帮帮我吗？

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [2025年二月4日 10:19 UTC](https://meta.discourse.org/t/mail-error-on-fresh-installation/350375/3 "2025-02-04T10:19:46Z")

</div>

您可以尝试的几件事

- 检查您的提供商是否允许使用不同的端口，看看您是否遇到相同的错误
- 如果您知道如何使用 `curl`，请尝试直接从 docker 容器内 curl 您的邮件设置
- 完全使用不同的邮件提供商，Mailgun 以与 Discourse 良好协作而闻名

---

<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: [2025年二月4日 11:35 UTC](https://meta.discourse.org/t/mail-error-on-fresh-installation/350375/4 "2025-02-04T11:35:13Z")

</div>

> [@newbie-on-discourse1](#):
>
> `Net::ReadTimeout`

看起来您的虚拟机正在阻止访问您的邮件服务器
