email_address_validator.rb 712 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. Rails.application.config.after_initialize do
  3. EmailAddressValidator::Config.configure(
  4. local_format: :standard,
  5. local_encoding: :unicode,
  6. host_local: true,
  7. host_fqdn: false,
  8. address_size: 3..250, # EmailAdress#email database field is limited to 250 characters, User#email is 255
  9. host_auto_append: false
  10. )
  11. # Allow emails with very long local part. For example Google Docs notifications emails
  12. EmailAddressValidator::Local.send(:remove_const, :STANDARD_MAX_SIZE)
  13. EmailAddressValidator::Local.const_set(:STANDARD_MAX_SIZE, 200)
  14. EmailAddressValidator::Config.providers.clear
  15. end