Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redmine email configuration: "undefined method `email_delivery=' for ActionMailer::Base:Class"

Tags:

ruby

redmine

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?

like image 773
Jon Cram Avatar asked Dec 12 '11 14:12

Jon Cram


2 Answers

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
like image 60
valanto Avatar answered Nov 15 '22 17:11

valanto


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.

like image 4
marapet Avatar answered Nov 15 '22 19:11

marapet