diff --git a/app/mailers/devise_notify_mailer.rb b/app/mailers/devise_notify_mailer.rb index 2e77c8b17..827e81b56 100644 --- a/app/mailers/devise_notify_mailer.rb +++ b/app/mailers/devise_notify_mailer.rb @@ -44,6 +44,8 @@ class DeviseNotifyMailer < Devise::Mailer end def intercept_send?(email) + return false unless email_allowlist + email_domain = email.split("@").last.downcase !(Rails.env.production? || Rails.env.test?) && email_allowlist.exclude?(email_domain) end diff --git a/config/locales/en.yml b/config/locales/en.yml index e6f94d28b..881179317 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -52,7 +52,7 @@ en: outside_collection_window: "Date must be within the current collection windows" postcode: "Enter a postcode in the correct format, for example AA1 1AA" email: - taken: "Email already exists" + taken: "Enter an email address that hasn’t already been used to sign up" invalid: "Enter an email address in the correct format, like name@example.com" blank: "Enter an email address" role: