Skip to content

Commit

Permalink
re-raise exception if mail delivery failed
Browse files Browse the repository at this point in the history
  • Loading branch information
mortbauer committed Feb 3, 2025
1 parent d148c74 commit 2736093
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/mailers/mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ def self.deliver_now_with_default_locale(&block)

def self.deliver_now
message = yield
message.deliver_now
message.deliver_now!
rescue StandardError => e
MailDeliveryStatus.create email: message.to[0], message: e.message
raise StandardError, e.message
end

# separate method to allow plugins to mess with the attachments
Expand Down

0 comments on commit 2736093

Please sign in to comment.