Mail is not sending after the latest update

Не удалось выполнить задания электронной почты в количестве 3852. Проверьте настройки почтового сервера в файле app.yml.

В sidekiq:

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

Mail server settings have not been changed

I’ve seen other posts with similar issues.

Are you using digital ocean? If so, they could be blocking the port you use.

What port are you using? Try setting it to 2525 in app.yml and rebuild. That worked for others.

If that doesn’t work, you might need to raise a ticket with them.

It was discovered that the problem is with the email provider

If you found the problem, please provide some more context and steps you took before marking your own post as the solution. That way, others can benefit from what you learned.

1 Like

Diagnostics:

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

Test in 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: 'Test from Rails',
  body: 'Test message'
).deliver_now

This results in a clear error text

1 Like