diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 630698da8..56881fd96 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -15,9 +15,10 @@ class ApplicationMailer < Mail::Notify::Mailer # # @see https://github.com/rails/rails/issues/39018 if respond_to?(:headers) - binding.break - email = Email.find(headers['email-log-id'].to_s) - email.update!(delivery_status: 'notify_error') + recipient_email = headers['To'].value + MailDeliveryFailure.create!( + recipient_email: recipient_email + ) end raise