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

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

在 sidekiq 中:

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

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

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

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

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

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

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

1 个赞

诊断:

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

在 Rails 中测试:

./launcher enter app
rails c
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

这会导致清晰的错误文本

1 个赞

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