我似乎无法通过设计获取用于密码恢复的电子邮件,以便在我的openshift应用上运行。我使用的是Rails 4.0.2和Ruby 1.9.3。我在production.rb
中尝试了以下内容:
config.action_mailer.default_url_options = { :host => 'mydomain.com' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:port => 25,
:address => 'smtp.mailgun.org',
:user_name => 'postmaster@domain.com',
:password => '[password]',
:domain => 'mydomain.com.mailgun.domain',
:authentication => :plain,
}
我还完成了谷歌使用所需的设置,并且在本地开发方面都很好。还尝试了端口465,587,如described here。遗憾的是,发送邮件仍然没有在生产中执行。该应用程序只会在日志中抛出任何错误。