Redmine email delivery error

I'm configuring email notifications for Redmine after installing Redmine for the first time. I created /etc/redmine/default/email.yml and added: # Outgoing email settings production: email_del...

I’m configuring email notifications for Redmine after installing Redmine for the first time.

I created /etc/redmine/default/email.yml and added:

# Outgoing email settings

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: smtp.example.com
      port: 25
      domain: example.com
      authentication: :login
      user_name: example
      password: example

When visiting http://redmine/ I encounter an application exception:

"undefined method 'email_delivery=' for ActionMailer::Base:Class"

which further refers to:

"/usr/lib/ruby/vendor_ruby/action_mailer/base.rb 433 in 'method_missing'"

I’ve followed the instructions at http://www.redmine.org/projects/redmine/wiki/EmailConfiguration (I added the relevant email.yml file with the relevant settings) but don’t understand what is needed to overcome this error.

What am I doing wrong?

jefflunt's user avatar

jefflunt

33.3k7 gold badges88 silver badges126 bronze badges

asked Dec 12, 2011 at 14:20

Jon Cram's user avatar

I was just having the same issue. I just removed the line «email_delivery:» and shifted everything 2 spaces back, restarted apache and it seemed to be ok! My email.yml looks like this now:

production:
  delivery_method: :smtp
  smtp_settings:
    address: smpt.example.com
    port: 25
    domain: example.com
    authentication: :none

answered Dec 12, 2011 at 15:27

valanto's user avatar

valantovalanto

8832 gold badges8 silver badges23 bronze badges

3

What version of redmine are you using?

The current version doesn’t use email.yml anymore, but configuration.yml for email settings.

From the commit message of r4752:

Email delivery settings that were stored in config/email.yml should be
moved to this new configuration file.

answered Dec 12, 2011 at 18:01

marapet's user avatar

marapetmarapet

53.7k12 gold badges163 silver badges181 bronze badges

With the release of Ubuntu 14.04 and the Ubuntu provided redmine-2.4.2-1 package, I had to use /etc/redmine/default/email.yml. /etc/redmine/default/configuration.yml was not recognized by Redmine, even though it’s what the error output shows in the web GUI.

And here is the very simple entry that worked for me (using postfix on local host):

production:
  email_delivery:
    delivery_method: :sendmail

hammady's user avatar

hammady

9491 gold badge13 silver badges22 bronze badges

answered Aug 13, 2014 at 20:41

Brian Elliott Finley's user avatar

Forums » Help »

Edit 28/05/2020: Adding a fourth error
Dear forum,

I’ve upgraded my Redmine 3.4.11 to 4.1.1 a week ago and all went fine expect with email notification.
I’m facing an sporadic issue: some emails goes out perfectly, and some others don’t, and gave me one of the three four following errors:

[ActiveJob] [ActionMailer::DeliveryJob] [xxx] Email delivery error: SSL_read: wrong version number
[ActiveJob] [ActionMailer::DeliveryJob] [xxx] Email delivery error: SSL_connect returned=1 errno=0 state=error: wrong version number
[ActiveJob] [ActionMailer::DeliveryJob] [xxx] Email delivery error: Net::OpenTimeout
[ActiveJob] [ActionMailer::DeliveryJob] [xxx] Email delivery error: end of file reached

System information:

$ rvm current
ruby-2.6.0

$ rails --version
Rails 5.2.4.2

$ ruby --version
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]

$ bundle --version
Bundler version 2.1.4

$ uname -r
4.15.0-99-generic

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" 

OpenSSL> version
OpenSSL 1.1.1  11 Sep 2018

$ mysql --version
mysql  Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using  EditLine wrapper

database.yml:
production:
  adapter: mysql2

configuration.yml:
delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: xxx
      port: 587
      domain: xxx
      #authentication: :plain
      authentication: :login
      user_name: "xxx" 
      password: "xxx" 
      openssl_verify_mode: 'none'

The «authentication» field was a try (without major changes) found in the only related post I found here: https://redmine.org/boards/2/topics/37326?r=38529#message-38529


RE: ActionMailer: «Email delivery error» since version 4.1.1

Added by David Doležal about 2 years ago

Hi,
can somebody help me please? After update from 3.4.6 I have problem with email notification. I tried Sidekiq, Inline, Async, and quite good is Sucker_Punch

I install sucker_punch as gem and use it with active job and sometime I don’t receive notification. For example in attachment is log, wher 3 emails arrived, this one no.

My setup
WINDOWS SERVER 2016

Environment:
Redmine version 4.1.1.stable
Ruby version 2.6.6-p146 (2020-03-31) [x64-mingw32]
Rails version 5.2.4.2
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::SuckerPunchAdapter
Mailer delivery smtp
SCM:
Filesystem
Redmine plugins:
redmine_custom_workflows 1.0.3
redmine_lightbox2 0.5.0

My configconfiguration.yml:

  1. specific configuration options for production environment
  2. that overrides the default ones
    production:
    email_delivery:
    delivery_method: :smtp
    smtp_settings:
    address: «<smtp_server_via_DNS_name>»
    port: 25
    domain: ‘<domain>’
    authentication: :login
    user_name: ‘<user>’
    password: ‘<pass>’
    openssl_verify_mode: ‘none’

I spent with it 2 days and nothing… :-(


RE: ActionMailer: «Email delivery error» since version 4.1.1

Added by David Doležal about 2 years ago

Sorry, my setup again and better

My setup

Environment:
  Redmine version                4.1.1.stable
  Ruby version                   2.6.6-p146 (2020-03-31) [x64-mingw32]
  Rails version                  5.2.4.2
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::SuckerPunchAdapter
  Mailer delivery                smtp
SCM:
  Filesystem                     
Redmine plugins:
  redmine_custom_workflows       1.0.3
  redmine_lightbox2              0.5.0

My configconfiguration.yml:

# specific configuration options for production environment
# that overrides the default ones
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "<smtp_server_via_DNS_name>" 
      port: 25
      domain: '<domain>'
      authentication: :login
      user_name: '<user>'
      password: '<pass>' 
      openssl_verify_mode: 'none'


RE: ActionMailer: «Email delivery error» since version 4.1.1

Added by David Doležal about 2 years ago

So here is point:

I send 5 email correctly, 6th crash with. Here is log from production.log.

2430: [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 026f2039-2754-4836-abfe-d93bbec43f76) to SuckerPunch(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000000000ede0388 @uri=#<URI::GID gid://redmine-app/User/5>>, #<GlobalID:0x000000000edeba80 @uri=#<URI::GID gid://redmine-app/Journal/7027>>
2434: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76] Performing ActionMailer::DeliveryJob (Job ID: 026f2039-2754-4836-abfe-d93bbec43f76) from SuckerPunch(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000000000ee11b68 @uri=#<URI::GID gid://redmine-app/User/5>>, #<GlobalID:0x000000000ee11320 @uri=#<URI::GID gid://redmine-app/Journal/7027>>
2436: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76]   Rendering mailer/issue_edit.text.erb within layouts/mailer
2440: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76]   Rendered mailer/_issue.text.erb (8.7ms)
2441: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76]   Rendered mailer/issue_edit.text.erb within layouts/mailer (9.5ms)
2442: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76]   Rendering mailer/issue_edit.html.erb within layouts/mailer
2446: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76]   Rendered mailer/_issue.html.erb (0.7ms)
2447: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76]   Rendered mailer/issue_edit.html.erb within layouts/mailer (9.9ms)
2470: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76] Email delivery error: end of file reached
2471: [ActiveJob] [ActionMailer::DeliveryJob] [026f2039-2754-4836-abfe-d93bbec43f76] Performed ActionMailer::DeliveryJob (Job ID: 026f2039-2754-4836-abfe-d93bbec43f76) from SuckerPunch(mailers) in 428.84ms

The same problem I have, when I 6-times click on Send a test mail in settings. 5-times email comes, 6th crash with (czech mutation of Redmine)

Při odesílání emailu nastala chyba (end of file reached) = An error occurred while sending the email (end of file reached)

I’m configuring email notifications for Redmine after installing Redmine for the first time.

I created /etc/redmine/default/email.yml and added:

# Outgoing email settings

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: smtp.example.com
      port: 25
      domain: example.com
      authentication: :login
      user_name: example
      password: example

When visiting http://redmine/ I encounter an application exception:

"undefined method 'email_delivery=' for ActionMailer::Base:Class"

which further refers to:

"/usr/lib/ruby/vendor_ruby/action_mailer/base.rb 433 in 'method_missing'"

I’ve followed the instructions at http://www.redmine.org/projects/redmine/wiki/EmailConfiguration (I added the relevant email.yml file with the relevant settings) but don’t understand what is needed to overcome this error.

What am I doing wrong?

jefflunt's user avatar

jefflunt

33.3k7 gold badges88 silver badges126 bronze badges

asked Dec 12, 2011 at 14:20

Jon Cram's user avatar

I was just having the same issue. I just removed the line «email_delivery:» and shifted everything 2 spaces back, restarted apache and it seemed to be ok! My email.yml looks like this now:

production:
  delivery_method: :smtp
  smtp_settings:
    address: smpt.example.com
    port: 25
    domain: example.com
    authentication: :none

answered Dec 12, 2011 at 15:27

valanto's user avatar

valantovalanto

8832 gold badges8 silver badges23 bronze badges

3

What version of redmine are you using?

The current version doesn’t use email.yml anymore, but configuration.yml for email settings.

From the commit message of r4752:

Email delivery settings that were stored in config/email.yml should be
moved to this new configuration file.

answered Dec 12, 2011 at 18:01

marapet's user avatar

marapetmarapet

53.7k12 gold badges163 silver badges181 bronze badges

With the release of Ubuntu 14.04 and the Ubuntu provided redmine-2.4.2-1 package, I had to use /etc/redmine/default/email.yml. /etc/redmine/default/configuration.yml was not recognized by Redmine, even though it’s what the error output shows in the web GUI.

And here is the very simple entry that worked for me (using postfix on local host):

production:
  email_delivery:
    delivery_method: :sendmail

hammady's user avatar

hammady

9491 gold badge13 silver badges22 bronze badges

answered Aug 13, 2014 at 20:41

Brian Elliott Finley's user avatar

UPD: см. также статью от 10.06.2022 «Перестала работать отправка почты в Redmine через Google«.

Сегодня мы с вами поговорим о том, как настроить электронную почту в программе Redmine.

Настройка параметров электронной почты в Redmine версии 2.1.2 осуществляется  в «INSTALLDIR / Apps / Redmine / Config / configuration.yml».

Обратите внимание, что в старых версиях (до 2.х.х) вы должны использовать » INSTALLDIR / Apps / Redmine / Config / email.yml «файл.

Простая Аутентификация (настройки по умолчанию)

# Outgoing email settings

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: smtp.example.net
      port: 25
      domain: example.net
      authentication: :login
      user_name: redmine@example.net
      password: redmine

development:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: 127.0.0.1
      port: 25
      domain: example.net
      authentication: :login
      user_name: redmine@example.net
      password: redmine

Пример конфигурации для GMail аккаунта

production:
  delivery_method: :smtp
  smtp_settings:
    address: "smtp.gmail.com"
    port: 587
    domain: "smtp.gmail.com"
    authentication: :plain
    user_name: "your_email@gmail.com"
    password: "your_password"
    enable_starttls_auto: true

Пожалуйста, убедитесь, что вы поставили enable_starttls_auto , иначе Redmine может выдать ошибку типа «530 5.7.0 Must issue a STARTTLS command first … «.

После того, как email.yml файл изменен, необходимо перезапустить процесс Apache:

$ sudo installdir/ctlscript.sh restart redmine

В Redmine 2,0 или выше, если вы видите подобную ошибку типа: » An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol) «, необходимо удалить «tls: true» из файла configuration.yml. Тогда, в этом случае, вы только должны перезагрузить Apache:

$ sudo installdir/ctlscript.sh restart apache

Если вы используете сервер SMTP, которые не требуют проверки подлинности, вполне возможно, что вы должны добавить следующие опции:

openssl_verify_mode: 'none'

Вы также можете изменить ссылку, которая появляется в электронной почте. Идете в  Администрирование -> Настройки -> Общие -> имя хоста и путь, и здесь вы должны прописать свой домен и порт.

Вы также можете найти более подробную информацию на Redmine wiki page и Redmine blog.

Удачи!!!

P. S. Если вы устанавливаете Redmine с помощью сборки BitNami, то в начале установки вам будет предложено сконфигурировать электронную почту, т. е. вписать имя электронного ящика и пароль к нему. При условии, что ваши введенные данные верны, электронная почта будет работать. Проверить это можно с помощью отправки тестового письма. Для этого вам необходимо после установки Redmine зайти под учетной записью, у которой есть права на  работу со вкладкой «Администрирование«. Далее «Настройки» -> «Уведомления по email«. Там вы уведите в поле «Исходящий адрес email» тот электронный ящик, который вы написали в процессе инсталляции Redmine. Внизу в правом углу есть ссылка «Послать email для проверки«. При нажатии на нее автоматически будет сформировано тестовое письмо, которое отправиться на ящик который вы указали при регистрации. Если вы его получили, значит почта настроена.

P.P.S. Если в настройке учётной записи «Уведомления по email» выбрано (по умолчанию): «Только о тех событиях, которые я отслеживаю или в которых я участвую», то вам будут отсылаться только уведомления по задачам которые или назначены Вам, или в которых вы выбраны Наблюдателем. Сообщения с форумов и новости Вы получать не будете, даже если участвуете в проекте.

Поэтому, чтобы для проектов в которых вы участвуете, получать уведомления на:

  • появление новых задачи и изменения в задачах проекта,
  • появление новостей,
  • появление новых документов и файлов,
  • сообщения на форуме,

нужно в «Уведомления по email» выбрать вариант «О всех событиях во всех моих проектах».

Понравилась статья? Поделить с друзьями:
  • Redmi note 9 pro частота обновления экрана как изменить
  • Redmi note 7 the system has been destroyed как исправить
  • Redmi fastboot как исправить
  • Redmi airdots рассинхронизация как исправить
  • Redmi 7a мало памяти как исправить