diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 7fc719874..77645856b 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -5,8 +5,6 @@ class ApplicationMailer < ActionMailer::Base default from: "#{APPLICATION_NAME} <#{CONTACT_EMAIL}>" layout 'mailer' - before_action :add_dolist_header - # Attach the procedure logo to the email (if any). # Returns the attachment url. def attach_logo(procedure) diff --git a/app/mailers/concerns/mailer_monitoring_concern.rb b/app/mailers/concerns/mailer_monitoring_concern.rb index 8dfd84179..398ac79d5 100644 --- a/app/mailers/concerns/mailer_monitoring_concern.rb +++ b/app/mailers/concerns/mailer_monitoring_concern.rb @@ -2,6 +2,8 @@ module MailerMonitoringConcern extend ActiveSupport::Concern included do + before_action :add_dolist_header + # Don’t retry to send a message if the server rejects the recipient address rescue_from Net::SMTPSyntaxError do |_exception| message.perform_deliveries = false