【发布时间】:2011-08-13 04:36:57
【问题描述】:
我正在尝试将 ActionMailer 配置为使用我的 Google Apps 帐户在开发模式下从 Devise 发送邮件。我已将以下内容添加到我的 config/environments/development.rb 文件中,但看起来没有发送邮件。注意:这是针对 Google Apps,而不是 Gmail(但 Gmail 服务器应该可以工作——它们在我的邮件客户端中可以工作)。
我的配置中有什么奇怪的地方吗?
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "mydomain.com",
:authentication => :login,
:user_name => "myemaiL@mydomain.com",
:password => "mypass"
}
【问题讨论】:
-
你设置了 config.action_mailer.raise_delivery_errors = true 吗?
标签: ruby-on-rails smtp devise actionmailer google-apps