Freeform Freeform for Craft

User Guides

Preventing Certain Email Addresses

If you'd like to prevent users from using certain types of email addresses (for example, you don't want them using common free ones like Gmail, Yahoo, etc), you can do this by somewhat "misusing" the Block Email addresses feature inside Freeform's Spam Settings area. It's meant to allow you to block common sources of spam, but technically can allow you to prevent legitimate users from using certain email address domains, and you can display an error for them too. Here's how you would set it up:


  • Go to CPFreeformSettingsSpam Settings.
  • In the Block Email addresses field, add some email address domains with wildcards like:
    • *
    • *
    • *
    • *
  • Enable the Display errors about blocked email(s) under each email field? setting.
  • Under that setting, in the Blocked Emails Error Message setting, add a message such as Email not allowed. Please use your company email address.
  • Save settings.

Once that is all applied, any user submitting the form with an email address like will see an error when the form is submitted, and below the Email field it will say:

Email not allowed. Please use your company email address.