我正在尝试让“忘记我的密码”选项起作用,但我想我在设置什么方面丢失了它。
当我用谷歌搜索时,我读到 Devise 有自己的 Action Mailer,所以我不必为它生成控制器和模型。
所以我编辑了我的config/enviroments/production.rb
config.action_mailer.default_url_options = { :host => 'example.com' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.example.com",
:port => 25,
:user_name => 'test@example.com',
:password => '123456',
:authentication => 'plain',
:enable_starttls_auto => true
}
在我的config/initializers/devise.rb
config.mailer_sender = "test@example.com"
诅咒这行不通。
SocketError (getaddrinfo: Name or service not known):
我坚信我把事情搞砸了或者忘记了一堆设置:)
有人可以指导我如何设置“忘记密码”选项吗?