Skip to content

Commit 9a43af2

Browse files
authored
Revert "Remove custom self.deliver_mail" (#11420)
1 parent 27f46da commit 9a43af2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/mailers/application_mailer.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ class ApplicationMailer < ActionMailer::Base
1010
# allow usage of application helper
1111
helper :application
1212

13+
def self.deliver_mail(mail)
14+
# Our SMTP service will throw an error if we attempt
15+
# to deliver an email without recipients. Occasionally
16+
# that happens due to events without members. This
17+
# will prevent those attempts from being made.
18+
return if mail.recipients.compact.empty?
19+
20+
super(mail)
21+
end
22+
1323
protected
1424

1525
def hcb_email_with_name_of(object)

0 commit comments

Comments
 (0)