我不是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