我已经从 technoweenie 安装了 restful_authentcation 并激活了,所以我看到了生成的 UserMailer < ActionMailer::Base。
但是,说明不包括如何设置它以使用 Google SMTP。
我猜environment/development.rb 需要有 SMTP 设置,但仍然不确定谷歌(通过谷歌应用程序)都是 TLS。
有人使用restful_authentication设置激活吗?
我目前将以下内容放入environments.rb:
ActionMailer::Base.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => "587",
:domain => "mydomain.com",
:authentication => :plain,
:user_name => "xxx@mydomain.com",
:password => "mypassword"
}
谢谢!!