Use mail gem instead of pony
authorTom Hughes <tom@compton.nu>
Thu, 16 Nov 2017 21:30:59 +0000 (21:30 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 16 Nov 2017 21:30:59 +0000 (21:30 +0000)
It seems pony hasn't been updated for a while and has broken
with the latest release of mail so just use mail directly.

cookbooks/chef/metadata.rb
cookbooks/chef/templates/default/report.rb.erb

index 57172da..5823fa6 100644 (file)
@@ -12,4 +12,4 @@ depends           "git"
 depends           "ohai"
 depends           "munin"
 depends           "systemd"
-gem               "pony"
+gem               "mail"
index 6b8ec5b..518ec13 100644 (file)
@@ -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