7

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
  • 33,527
  • 7
  • 88
  • 126
Jon Cram
  • 16,609
  • 24
  • 76
  • 107

3 Answers3

17

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
valanto
  • 893
  • 3
  • 8
  • 23
  • Not in mac os x with redmine 2.3 – BTR Naidu May 27 '13 at 14:35
  • Oldie but goldie. :-) It solved the issue on Ubuntu 16.04 with Redmine from the repository. Thx – Semo Feb 09 '17 at 11:47
  • This is because the example configuration file has one active `email_delivery:` at the beginning of the file and we usually uncomment one of the examples below, making it two `email_delivery: email_delivery: delivery_method: ...`. They should correct this... – Matthieu Aug 23 '23 at 15:07
4

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.

marapet
  • 54,856
  • 12
  • 170
  • 184
0

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
  • 969
  • 1
  • 13
  • 22