Block Free Emails
WordPress plugin that blocks free consumer email domains on Elementor Pro forms and prompts users to enter a business email instead.
by Paradorn Katananon · github.com/paradonk/block-free-emails
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/paradonk/block-free-emails/releases/download/v2.2.0/block-free-emails-v2.2.0.zipReadme
Block Free Emails
A WordPress plugin that blocks free consumer email providers on an Elementor Pro form and shows a popup modal asking the user to enter a business email instead.
Requirements
- WordPress 5.0+
- Elementor Pro (with Forms module)
- PHP 7.4+
Installation
- Download or clone this repository
- Upload the
block-free-emailsfolder to/wp-content/plugins/ - Activate the plugin in WordPress Admin → Plugins
How it works
Three layers of protection run in sequence:
| Layer | What it does |
|---|---|
| Client-side popup | Intercepts form submit before Elementor fires, shows a modal if a free email domain is detected |
| JS token check | Server rejects any submission missing the JS token — blocks JS-disabled browsers and raw POST bots |
| Server-side validation | Re-validates the email domain on the server regardless of how the request arrived |
Default target form
The plugin is pre-configured to protect a form named exactly:
Contact Us Form
This must match the Form Name field inside the Elementor Pro form widget settings (case-sensitive).
Using a different form name
If your form has a different name, open block-free-emails.php and change line 19:
private const TARGET_FORM = 'Contact Us Form';
For example:
private const TARGET_FORM = 'Get In Touch';
Save the file and the plugin will protect your renamed form automatically.
Customising the popup message
The popup title, body text, and button label are in block-free-emails.php inside enqueue_assets():
wp_localize_script( 'bfe-script', 'bfeData', [
'domains' => self::$free_domains,
'title' => 'Business Email Required',
'message' => 'Free email providers such as Gmail, Yahoo, and Outlook are not accepted...',
'btnLabel' => 'Got it — I\'ll update my email',
] );
Edit those three strings to match your language or tone.
Adding or removing blocked domains
The domain list is the $free_domains array in block-free-emails.php. Add any domain you want blocked:
private static $free_domains = [
'gmail.com',
'yahoo.com',
// add more here
'qq.com',
'naver.com',
];
License
This plugin is released under the GPL-2.0-or-later license.
You are free to use, modify, and redistribute it under the same license terms.
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v2.2.0 | May 10, 2026 | block-free-emails-v2.2.0.zip | 5 |