From 05904394a4ccbf0a6f2571117956f3640f98a04e Mon Sep 17 00:00:00 2001 From: Preston Marshall Date: Wed, 14 Nov 2012 16:25:48 -0600 Subject: [PATCH] Allow other fields that specify recipients, not just "to" --- lib/sidekiq/extensions/action_mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sidekiq/extensions/action_mailer.rb b/lib/sidekiq/extensions/action_mailer.rb index c8366ecd..df13cc75 100644 --- a/lib/sidekiq/extensions/action_mailer.rb +++ b/lib/sidekiq/extensions/action_mailer.rb @@ -19,7 +19,7 @@ module Sidekiq msg = target.send(method_name, *args) # The email method can return nil, which causes ActionMailer to return # an undeliverable empty message. - msg.deliver if msg && msg.to && msg.from + msg.deliver if msg && (msg.to || msg.cc || msg.bcc) && msg.from end end