2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-01-11 00:30:12 +01:00
|
|
|
# Must be registered *before* loading custom delivery methods
|
|
|
|
# otherwise the observer won't be invoked.
|
|
|
|
#
|
2023-03-06 17:06:10 +01:00
|
|
|
require_relative "../../app/services/email_delivery_observer"
|
2023-06-19 15:24:10 +02:00
|
|
|
require_relative "../../app/services/email_delivering_interceptor"
|
2023-03-06 17:06:10 +01:00
|
|
|
|
2023-01-11 00:30:12 +01:00
|
|
|
ActiveSupport.on_load(:action_mailer) do |mailer|
|
2023-06-19 15:24:10 +02:00
|
|
|
mailer.register_interceptor EmailDeliveringInterceptor
|
2023-01-11 00:30:12 +01:00
|
|
|
mailer.register_observer EmailDeliveryObserver
|
2023-01-09 17:05:38 +01:00
|
|
|
end
|