【发布时间】:2018-03-16 08:58:57
【问题描述】:
我不是 Ruby 和 Redmine 方面的专家,但我正在尝试在 redmine 中配置电子邮件通知。 Redmine 3.4 版 红宝石 2.3.3p222 Phusion 乘客 5.1.7
在 configuration.yml 我有
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "xxxx.pl"
port: 587
authentication: :plain
domain: 'redmine.xxx.pl'
user_name: '.....@redmine.xxx.pl'
password: '......'
但我收到此错误:
Error ID: 54731089
Error details saved to: /tmp/passenger-error-WqNBmN.html
Message from application: undefined method `address=' for ActionMailer::Base:Class (NoMethodError)
我稍微搜索了一下,发现我在 application.rb 文件中缺少方法。
所以在 Redmine config/application.rb 中我添加了类似的内容:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "xxx.pl",
port: 587,
user_name: 'powiadomienia@redmine.xxx.pl',
password: '.....',
authentication: :plain
}
但仍然有同样的错误。不幸的是,我在 Redmine 配置中找不到任何示例。
谁能帮帮我?
【问题讨论】:
-
您不需要在
application.rb中添加您的邮件配置。 Redmine 的configuration.yml就够了。属于您的错误消息的堆栈跟踪将有助于确定到底哪里出了问题。 -
是的,但仍然有同样的错误。即使我使用默认的
application.rb并在configuration.yml中配置电子邮件,仍然有同样的错误,redmine 无法启动。
标签: ruby-on-rails ruby email smtp redmine