我不是Ruby和Redmine的专家,但我试图在redmine中配置电子邮件通知。 管理平台3.4版 红宝石2.3.3p222 的Phusion客运5.1.7Redmine中的电子邮件配置 - 未定义的方法`地址='
在configuration.yml我
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "xxxx.pl"
port: 587
authentication: :plain
domain: 'redmine.xxx.pl'
user_name: '[email protected]'
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文件中缺少方法。
所以在管理平台的config/application.rb中我添加类似的东西:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "xxx.pl",
port: 587,
user_name: '[email protected]',
password: '.....',
authentication: :plain
}
但仍然有同样的错误。不幸的是,我在Redmine配置中找不到任何示例。
任何人都可以帮助我吗?
您不需要在'application.rb'中添加邮件配置。 Redmine的'configuration.yml'就足够了。属于您的错误消息的堆栈跟踪将有助于确定出错的地方。 – jkraemer
是的,但仍然有相同的错误。即使我使用默认的'application.rb'并在'configuration.yml'中配置电子邮件,仍然有相同的错误,redmine将无法启动。 – KacproSo