From 9a127b8704158f67c3a8eb44b1a93f8ac7f4f6a0 Mon Sep 17 00:00:00 2001 From: Shujat Khalid Date: Wed, 24 Jul 2024 10:01:20 +0100 Subject: [PATCH] add interceptor file --- app/lib/email_log_interceptor.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/lib/email_log_interceptor.rb diff --git a/app/lib/email_log_interceptor.rb b/app/lib/email_log_interceptor.rb new file mode 100644 index 000000000..bfbfd23d0 --- /dev/null +++ b/app/lib/email_log_interceptor.rb @@ -0,0 +1,11 @@ +# lib/email_log_interceptor.rb + +class EmailLogInterceptor + MailDeliveryFailure.create!( + email_address: email_address, + mailer_class: mailer_class, + mailer_action_method: mailer_action_method, + error_message: error.message + ) + end + \ No newline at end of file