# 上次更新后无法发送电子邮件

**URL:** <https://meta.discourse.org/t/mail-is-not-sending-after-the-latest-update/378784>\
**Category:** Support\
**Tags:** email\
**Created:** [2025年八月15日 18:48 UTC](https://meta.discourse.org/t/mail-is-not-sending-after-the-latest-update/378784 "2025-08-15T18:48:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xpamych](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xpamych/32/373108_2.png) [@xpamych](https://meta.discourse.org/u/xpamych)\
**Post date:** [2025年八月15日 18:48 UTC](https://meta.discourse.org/t/mail-is-not-sending-after-the-latest-update/378784/1 "2025-08-15T18:48:11Z")

</div>

未能为 3852 个电子邮件作业执行操作。请检查 app.yml 文件中的邮件服务器设置。

在 sidekiq 中：

```plaintext
Jobs::HandledExceptionWrapper: Wrapped OpenSSL::SSL::SSLError: SSL_read: unexpected eof while reading

```

---

<div class="post-metadata">

**Author:** ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)\
**Post date:** [2025年八月18日 09:07 UTC](https://meta.discourse.org/t/mail-is-not-sending-after-the-latest-update/378784/2 "2025-08-18T09:07:51Z")

</div>

我看到过其他帖子也有类似的问题。

您在使用 DigitalOcean 吗？如果是，他们可能会阻止您使用的端口。

您使用的是什么端口？尝试在 `app.yml` 中将其设置为 2525 并重新构建。这对其他人有效。

如果那不起作用，您可能需要向他们提交一个工单。

---

<div class="post-metadata">

**Author:** ![xpamych](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xpamych/32/373108_2.png) [@xpamych](https://meta.discourse.org/u/xpamych)\
**Post date:** [2025年八月18日 09:36 UTC](https://meta.discourse.org/t/mail-is-not-sending-after-the-latest-update/378784/3 "2025-08-18T09:36:24Z")

</div>

发现问题出在电子邮件提供商

---

<div class="post-metadata">

**Author:** ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)\
**Post date:** [2025年八月18日 09:52 UTC](https://meta.discourse.org/t/mail-is-not-sending-after-the-latest-update/378784/4 "2025-08-18T09:52:05Z")

</div>

如果您找到了问题，请提供更多上下文以及在将自己的帖子标记为解决方案之前所采取的步骤。这样，其他人就可以从您学到的知识中受益。

---

<div class="post-metadata">

**Author:** ![xpamych](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xpamych/32/373108_2.png) [@xpamych](https://meta.discourse.org/u/xpamych)\
**Post date:** [2025年八月18日 10:06 UTC](https://meta.discourse.org/t/mail-is-not-sending-after-the-latest-update/378784/5 "2025-08-18T10:06:57Z")

</div>

诊断：

```bash
./launcher enter appopenssl s_client -connect smtp.beget.com:465 -servername smtp.beget.co

```

在 Rails 中测试：

```bash
./launcher enter app
rails c

```

```ruby
ActionMailer::Base.smtp_settings = {
  address: 'smtp.beget.com',
  port: 465,
  user_name: 'admin@email.com',
  password: 'password',
  authentication: :login,
  ssl: true,
  tls: true,
  enable_starttls_auto: false,
  openssl_verify_mode: 'none'
}

# 测试发送
ActionMailer::Base.mail(
  from: 'admin@email.com',
  to: 'admin@email.com',
  subject: '来自 Rails 的测试',
  body: '测试消息'
).deliver_now

```

这会导致清晰的错误文本

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2025年九月17日 10:07 UTC](https://meta.discourse.org/t/mail-is-not-sending-after-the-latest-update/378784/6 "2025-09-17T10:07:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
