电子邮件通知不是从 God gem 发送的
我使用God gem 来监视我的delayed_job 进程,到目前为止,gem 正在按其应有的方式完成其工作,但由于某种原因我无法让他发送电子邮件通知(我使用谷歌应用程序)。 这是我的上帝文件配置:
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
有什么想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据邮件列表上的这篇文章:
gem install tlsmail
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
神的配置的一部分
:login
而不是true
作为您的server_auth
设置。According to this post on the mailing list:
gem install tlsmail
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
in the emailpart of god's config
:login
intead oftrue
for yourserver_auth
setting.