Title: Gravity Forms Email Blacklist
Author: CrossPeak
Published: <strong>2014 年 4 月 3 日</strong>
Last modified: 2026 年 5 月 29 日

---

搜索插件

![](https://ps.w.org/gravity-forms-email-blacklist/assets/banner-772x250.png?rev
=2888656)

![](https://ps.w.org/gravity-forms-email-blacklist/assets/icon-256x256.png?rev=2888656)

# Gravity Forms Email Blacklist

 作者：[CrossPeak](https://profiles.wordpress.org/crosspeak/)

[下载](https://downloads.wordpress.org/plugin/gravity-forms-email-blacklist.2.6.2.zip)

 * [详情](https://cn.wordpress.org/plugins/gravity-forms-email-blacklist/#description)
 * [评价](https://cn.wordpress.org/plugins/gravity-forms-email-blacklist/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/gravity-forms-email-blacklist/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/gravity-forms-email-blacklist/#developers)

 [支持](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/)

## 描述

The Email Blacklist Add-on for Gravity Forms was built to help block submissions
from users with generic or competitors email addresses. Prevent the user from processing
the form and stop non-qualified leads from being collected.

This plugin allows site admins to create a list of domains that if used in an email
field on a Gravity Form it will cause a validation error and block the submission.
A default email blacklist and validation message can be created to use across all
email fields. These default settings can be overridden on a per email field basis.

Global settings can be added on ‘Forms’ > ‘Settings’ > ‘Email Blacklist’. To add
settings to an individual email field, select the field and navigate to the ‘Advanced
Settings’ tab.

This plugin works by blocking either individual email addresses (ex. jsmith@gmail.
com), email address domains (ex. gmail.com), and/or email address top-level domains(
ex. *.com).

Feel free to contribute on [github](https://github.com/crosspeaksoftware/gravity-forms-email-blacklist).

### Instructions

### Global Blacklist Settings

Once set up, these settings will be used on all email input fields across all the
Gravity Forms used on the site. They can be overridden by the individual email blacklist
settings below.

 1. Once Logged into your site navigate to ‘Forms’ > ‘Settings’ > ‘Email Blacklist’
 2. In the ‘Global Blacklisted Emails’ input enter a comma separated list of blacklisted
    domains (ie. hotmail.com), email addresses (ie. user@aol.com), and/or include the
    wildcard notation to block top-level domains (ie. *.com). This setting can be overridden
    on individual email fields in the advanced settings.
 3. In the ‘Global Validation Message’ input enter a default error message if a blacklisted
    email is submitted. This setting can be overridden on individual email fields in
    the advanced settings.
 4. Select the ‘Global Invalid Entry Procedure’ to determine how the blacklisted submissions
    should be handled, with validation error or collected and marked as spam.
 5. Click the ‘Update Settings’ button to save the settings.

### Individual Email Input Blacklist Settings

Once set up these settings will be used on this form only and in place of the global
blacklist settings above.

 1. Once Logged into your site navigate to the Gravity Form you would like to update.
 2. Add or update an existing email input field on the form.
 3. Go to the ‘Advanced Settings’ tab for the ‘Blacklisted Emails’ input.
 4. In the ‘Blacklisted Emails’ input enter a comma separated list of blacklisted domains(
    ie. hotmail.com), email addresses (ie. user@aol.com), and/or include the wildcard
    notation to block top-level domains (ie. *.com). This will override the globally
    defined blacklisted emails setting. Enter ‘none’ to bypass the global setting and
    allow all email addresses.
 5. In the ‘Blacklisted Emails Validation Message’ input enter an error message if 
    a blacklisted email is submitted. This will override the globally defined error
    message.
 6. Select the ‘Invalid Entry Procedure’ to determine how the blacklisted submissions
    should be handled, with validation error or collected and marked as spam.
 7. Click the ‘Save Form’ button to save the settings.

### Additional Resources

 * [Gravity Forms Documentation – Getting Started](https://docs.gravityforms.com/category/getting-started/)
 * [Gravity Forms Documentation – Email Input Fields](https://docs.gravityforms.com/email/)
 * [Gravity Forms Documentation – Fighting Spam](https://docs.gravityforms.com/spam/)

## 屏幕截图

[⌊Global Plugin Settings⌉⌊Global Plugin Settings⌉[

Global Plugin Settings

[⌊Email Field Settings⌉⌊Email Field Settings⌉[

Email Field Settings

[⌊Form Validation Error⌉⌊Form Validation Error⌉[

Form Validation Error

## 安装

 1. Search for and install the ‘Gravity Forms Email Blacklist’ OR Upload `gravity-forms-
    email-blacklist` to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Navigate from the Dashboard to the ‘Forms’ > ‘Settings’ > ‘Email Blacklist’ to 
    make sure it is installed.

## 评价

![](https://secure.gravatar.com/avatar/abe78a242585216adb71ac16029ae591ee9ec6c0dc8c08cfd3541d924342cdae?
s=60&d=retro&r=g)

### 󠀁[It works!](https://wordpress.org/support/topic/it-works-2525/)󠁿

 [@anansi.pro](https://profiles.wordpress.org/mahasvin/) 2024 年 10 月 7 日

GF 2.8.18 , WP 6.5.5, PHP 8.2.23. WPE hosting. It even works wih 3.5 thousand rules
in a single string for blacklist of disposable email domains.

![](https://secure.gravatar.com/avatar/9a7c7936ba87fcf84ad20b4ed45fd555e708116cc4416b3f175f72053f1da248?
s=60&d=retro&r=g)

### 󠀁[PHP 8](https://wordpress.org/support/topic/php-8-74/)󠁿

 [sandrowuermli](https://profiles.wordpress.org/sandrowuermli/) 2023 年 10 月 2 
日 2 回复

Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array
given in (original path removed for privacy reason)/plugins/gravity-forms-email-
blacklist/includes/class-gfemailblacklist.php:259I guess it’s because of PHP 8. 
This shouldn’t happen at all, please fix it.

![](https://secure.gravatar.com/avatar/3ec77cdbe481dfb9d440ea7adf4ccc0d26302af71ece5f03175d6d14b85be5bc?
s=60&d=retro&r=g)

### 󠀁[Great Addon, outstanding support!](https://wordpress.org/support/topic/great-addon-outstanding-support/)󠁿

 [redactuk](https://profiles.wordpress.org/redactuk/) 2023 年 8 月 28 日

This Addon for Gravity forms does exactly as advertised. On top of that, when I 
had an issue recently the support response via these forums was outstanding. Probably
the best I’ve ever received via this site. Well done guys!

![](https://secure.gravatar.com/avatar/97760bfb88d9764278a9daf196a245decdc230189b13d99dd49f8e575955190d?
s=60&d=retro&r=g)

### 󠀁[Need support for blocking domain names with wildcards, not just TLDs](https://wordpress.org/support/topic/need-support-for-blocking-domain-names-with-wildcards-not-just-tlds/)󠁿

 [ericscoles](https://profiles.wordpress.org/ericscoles/) 2023 年 7 月 1 日

Still evaluating, but one key deficit is that wildcard support doesn’t seem to extend
to domains, only to TLDs. Why that matters: We routinely get hammered by exploit
probes using example.* domains, which blow past reCAPTCHA without slowing down. (
Presumably they use example.* on the assumption it will be allowed to pass through
filters.) It’s a massive inconvenience for the people receiving our forms. (Yes,
I realize this would also block submissions from vuln scanning suites.)

![](https://secure.gravatar.com/avatar/c3bd0663e38a2e6496cc97a6a86b446d4701ed8e64cada9dac446564745b4127?
s=60&d=retro&r=g)

### 󠀁[Great plugin. Easy to setup. No more spam!](https://wordpress.org/support/topic/great-plugin-easy-to-setup-no-more-spam/)󠁿

 [Matt Rock](https://profiles.wordpress.org/mattrock1/) 2022 年 10 月 18 日

The ability to use wildcards is a super feature. No more spam from the .ru domain!
Thanks so much for this.

![](https://secure.gravatar.com/avatar/44e2ecd50afa090c9e6c4683eb5388bdb5c6feff5979a55502a3219847bebcad?
s=60&d=retro&r=g)

### 󠀁[not working](https://wordpress.org/support/topic/not-working-3961/)󠁿

 [gaetaneksz](https://profiles.wordpress.org/gaetaneksz/) 2022 年 9 月 12 日 1 回复

not working anymore

 [ 阅读所有16条评价 ](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/reviews/)

## 贡献者及开发者

「Gravity Forms Email Blacklist」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ CrossPeak ](https://profiles.wordpress.org/crosspeak/)
 *   [ Hall ](https://profiles.wordpress.org/hallme/)
 *   [ TimBHowe ](https://profiles.wordpress.org/timbhowe/)

[帮助将「Gravity Forms Email Blacklist」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/gravity-forms-email-blacklist)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/gravity-forms-email-blacklist/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/gravity-forms-email-blacklist/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/gravity-forms-email-blacklist/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/gravity-forms-email-blacklist/)。

## 更新日志

#### 2.6.2

 * Fix: Improve loading of SVG icon to prevent warning on some servers.

#### 2.6.1

 * Fix: Better handle invalid syntax in the blacklist rules and ignore it.

#### 2.6.0

 * Enhancement: Added support to treat submissions with blacklisted emails as spam.
 * Enhancement: Added the ability to include * for wildcards anywhere in the blacklisted
   address or domain.

#### 2.5.6

 * Fix PHP error under PHP 8+
 * Fix with multiple email fields and different blacklists.

#### 2.5.5

 * Fixed version number issue

#### 2.5.4

 * Fixed validation function to remove any empty values for the array of blacklisted
   emails to prevent false positives from empty email fields.
 * Added capability declination to the class to allow the plugin to work with role
   and capabilities plugins.

#### 2.5.3

 * Updated labels and descriptions throughout the admin settings to improve clarity.

#### 2.5.2

 * Fix: Updated method for getting the TLD to make sure the domain wildcards work
   in the case of a sub-domain email.

#### 2.5.1

 * Updated static setting strings to allow them to be translated.
 * Added Text Domain.
 * Added a function to Load Loads a plugin’s translated strings.
 * Added filter to allow 3rd party plugins to alter the validation message before
   it is output.
 * Added filter to allow 3rd party plugins to alter the is_valid check.
 * Added short circuit filter to allow 3rd party plugins to jump over a check.

#### 2.5

 * Updated documentation, readme and added instructions.
 * Updated version number and plugin information on compatibility and stable release.
 * Fix: Updated validation function to account for email fields hidden by conditional
   logic

#### 2.4

 * Updated the plugin to allow the use of wildcards to block whole top-level domains.

#### 2.3

 * Updated the way the AddOn is initiated.
 * Updated code to meet PHPCS code standards for WordPress.
 * Updated version and compatibility numbers.
 * Updated readme.txt.

#### 2.2

 * Added Author URL to GitHub Repo
 * Fixed typo in readme.txt

#### 2.1

 * Added plugin icon

#### 2.0

 * Bug Fix: Removed ‘var_dump’ in validation function.
 * Added ‘gf_emailblacklist_clean’ function to make comparison case insensitive.
   Thanks to @ractoon, @rscoates.
 * Updated function to work with both email domains and specific emails.
 * Ran ‘class-gfemailblacklist.php’ through [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer/wiki)
   with [WordPress Coding Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki).
 * Moved class to ‘/includes/class-gfemailblacklist.php’ file.
 * Added placeholder text to fields
 * Updated code comments.
 * Updated plugin file name.
 * Updated readme.txt and README.md

#### 1.1

 * Added custom validation message options to the email field under the ‘Advanced’
   field settings
 * Added default setting for the email blacklist and validation message to the form
   settings area to be used on all forms with an email field.

#### 1.0

 * Added email blacklist options to the email field under the ‘Advanced’ field settings

## 额外信息

 *  版本 **2.6.2**
 *  最后更新：**1 周前**
 *  活跃安装数量 **10,000+**
 *  WordPress 版本 ** 3.8 或更高版本 **
 *  已测试的最高版本为 **7.0**
 *  语言
 * [English (US)](https://wordpress.org/plugins/gravity-forms-email-blacklist/)
 * 标签
 * [blacklist](https://cn.wordpress.org/plugins/tags/blacklist/)[block email](https://cn.wordpress.org/plugins/tags/block-email/)
   [email blacklist](https://cn.wordpress.org/plugins/tags/email-blacklist/)[gravity forms](https://cn.wordpress.org/plugins/tags/gravity-forms/)
 *  [高级视图](https://cn.wordpress.org/plugins/gravity-forms-email-blacklist/advanced/)

## 评级

 4.3 星（最高 5 星）。

 *  [  12 条 5 星评价     ](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/reviews/?filter=2)
 *  [  2 条 1 星评价     ](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/reviews/)

## 贡献者

 *   [ CrossPeak ](https://profiles.wordpress.org/crosspeak/)
 *   [ Hall ](https://profiles.wordpress.org/hallme/)
 *   [ TimBHowe ](https://profiles.wordpress.org/timbhowe/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/gravity-forms-email-blacklist/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.crosspeaksoftware.com/process-payment/)