Emails notifications are not sent from the God gem

1.8k views Asked by At

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 I 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 = '[email protected]'
  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 = '[email protected]'
  d.server_password = 'myPassword'
end


God.contact(:email) do |c|
  c.name = 'me'
  c.group = 'developers'
  c.to_email = '[email protected]'
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?

1

There are 1 answers

2
wuputah On BEST ANSWER

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.