aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorYoshiyuki Kinjo <yskkin@gmail.com>2018-09-08 17:14:12 +0900
committerYoshiyuki Kinjo <yskkin@gmail.com>2018-09-08 17:29:28 +0900
commit383b8bc8e215d5fa2b018d6f0b9c363ea95251cf (patch)
tree3fed38fc6682c1dcc753d58accb2e543652a2e20 /actionmailer/lib
parent5f35c60f848dda275e34bc055f58031c08d7b416 (diff)
downloadrails-383b8bc8e215d5fa2b018d6f0b9c363ea95251cf.tar.gz
rails-383b8bc8e215d5fa2b018d6f0b9c363ea95251cf.tar.bz2
rails-383b8bc8e215d5fa2b018d6f0b9c363ea95251cf.zip
Skip delivery notification when perform_deliveries is false.
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 7f22af83b0..1ab2c55a6c 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -579,6 +579,7 @@ module ActionMailer
# calling +deliver_mail+ directly and passing a <tt>Mail::Message</tt> will do
# nothing except tell the logger you sent the email.
def deliver_mail(mail) #:nodoc:
+ return unless mail.perform_deliveries
ActiveSupport::Notifications.instrument("deliver.action_mailer") do |payload|
set_payload_for_mail(payload, mail)
yield # Let Mail do the delivery actions