我的heroku应用程序有问题,我正在尝试使用Godaddy电子邮件帐户发送电子邮件,这是我在环境/ production.rb中的设置:
config.active_support.deprecation = :notify
config.action_mailer.default_url_options = { :host => 'coursebuilder2.heroku.com' }
config.action_mailer.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtpout.secureserver.net",
:port => 25,
:user_name => "myemail@domain.com",
:password => "password",
:authentication => :login
}
config.action_mailer.raise_delivery_errors = true
但是,这是我得到的:
Rendered instructors/mailer/confirmation_instructions.html.erb (1.1ms)
Completed 500 Internal Server Error in 666ms
SocketError (getaddrinfo: Name or service not known):
cache: [POST /instructors] invalidate, pass
那么,我在这里缺少什么?
修改
我已经修复了上面的设置,但是,现在,我有一个超时错误:
2012-03-04T04:44:20+00:00 app[web.1]: Rendered instructors/mailer/confirmation_instructions.html.erb (0.4ms)
2012-03-04T04:44:50+00:00 heroku[router]: Error H12 (Request timeout) -> POST coursebuilder2.herokuapp.com/instructors dyno=web.1 queue= wait= service=30000ms status=503 bytes=0
2012-03-04T04:45:20+00:00 app[web.1]: Completed 500 Internal Server Error in 60414ms
2012-03-04T04:45:20+00:00 app[web.1]:
2012-03-04T04:45:20+00:00 app[web.1]:
2012-03-04T04:45:20+00:00 app[web.1]: Timeout::Error (Timeout::Error):
2012-03-04T04:45:20+00:00 app[web.1]:
2012-03-04T04:45:20+00:00 app[web.1]:
2012-03-04T04:45:20+00:00 app[web.1]: cache: [POST /instructors] invalidate, pass
任何人都可以提出建议吗?
答案 0 :(得分:2)
看起来你正在使用GoDaddy错误的连接细节 - 说实话,我倾向于使用广泛使用和记录的SendGrid免费插件。