unless Rails.env.production?
  class OverrideMailRecipient
    def self.delivering_email(mail)
      mail.to = anon_email(mail.to.first)
    end

    def self.anon_email(email)
      email['@'] = '_'
      "test+#{email}@holderdeord.no"
    end
  end
  ActionMailer::Base.register_interceptor(OverrideMailRecipient)
end
Add override for mail recipients unless production
Add override for mail recipients unless production
