开发者

Emails notifications are not sent from the God gem

I use the God gem to monitor my delayed_job processes, so far the gem is doing its job as it should but from some reason 开发者_如何学GoI can't get him to send email notifications (i use google apps). Here are my god file configuration:

God::Contacts::Email.defaults do |d|
  d.from_email = 'system@example.com'
  d.from_name = 'Process monitoring'
  d.delivery_method = :smtp
  d.server_host = 'smtp.gmail.com'
  d.server_port = 587
  d.server_auth = true
  d.server_domain = 'example.com'
  d.server_user = 'system@example.com'
  d.server_password = 'myPassword'
end


God.contact(:email) do |c|
  c.name = 'me'
  c.group = 'developers'
  c.to_email = 'me@example.com'
end     

w.start_if do |start|
  start.condition(:process_running) do |c|
  c.interval = 20.seconds
  c.running = false
  c.notify = {:contacts => ['me'], :priority => 1, :category => 'staging'}
end

Any thoughts?


According to this post on the mailing list:

  1. gem install tlsmail
  2. add Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE) in the email part of god's config
  3. Use :login intead of true for your server_auth setting.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜