From: Tom Hughes Date: Thu, 16 Nov 2017 21:30:59 +0000 (+0000) Subject: Use mail gem instead of pony X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/d8918f9ea40389c835f6a8d740d2ea95ddfceedb Use mail gem instead of pony It seems pony hasn't been updated for a while and has broken with the latest release of mail so just use mail directly. --- diff --git a/cookbooks/chef/metadata.rb b/cookbooks/chef/metadata.rb index 57172dafe..5823fa6d6 100644 --- a/cookbooks/chef/metadata.rb +++ b/cookbooks/chef/metadata.rb @@ -12,4 +12,4 @@ depends "git" depends "ohai" depends "munin" depends "systemd" -gem "pony" +gem "mail" diff --git a/cookbooks/chef/templates/default/report.rb.erb b/cookbooks/chef/templates/default/report.rb.erb index 6b8ec5b9c..518ec1383 100644 --- a/cookbooks/chef/templates/default/report.rb.erb +++ b/cookbooks/chef/templates/default/report.rb.erb @@ -26,10 +26,14 @@ class Chef message << Array(backtrace).join("\n") - require "pony" + require "mail" - Pony.mail(:to => @config[:to], :from => @config[:from], - :subject => subject, :body => message, :via => :smtp) + Mail.deliver do + to @config[:to] + from @config[:from] + subject subject + body message + end end end end