
block spam email
Tired of getting unwanted “junk” emails? How to effectively block spam emails?
Table of Contents
Send you various offers in the form of advertisements for drugs, gam***ng or ad*** content.
Your email is an easy target for world marketers because your email is open, listed on websites, forums, social media, domain ownership whois data, and other media.
It gets really annoying and time consuming dealing with spam emails, not to mention there’s no “unsubscribe” link. It’s time for you to block spam emails from the WordPress Contact Form.
Use Spam Filters in cPanel
Previously prepare your cPanel data:
- Access to login to your cPanel account.
- Email account that has been created in cPanel.

spam
Login to cPanel then you will enter on the main page:
- Find “Email” and click “Spam Filters“.
- Select Enable for “Automatically Delete New Spam (Auto-Delete)“.
- Click “Configure Auto-Delete Settings” and default to 5.
spam2
- Click “Show Additional Configuration” then click “Edit Spam Whitelist Settings” to add a list of non-spam emails.
- Click “Edit Spam Blacklist Settings” to add a spam email list.

spam3
You will enter the “Blacklist” page, please fill in the spam email that you want to block. Please use the “*” as a wildcard to represent multiple characters and the “?” to represent a single wildcard character.

block spam email2
An example of how to use wildcards to block email spam:
- spam@example.com — single email address blacklist.
- *@example.com — blacklists all addresses on example.com.
- ?pam@example.com — Blacklist one character in addresses on example.com (for example, spam@example.com, but not byesam@example.com).
When finished, don’t forget to click “Update Blacklist (blacklist_from)“.
Block Spam Emails from WordPress Contact Form
Contact forms are usually set up automatically so that is a problem even for small and lesser known websites like “bots” that automatically send spam.
These spambots crawl websites and look for unsafe contact forms, so they can email you spam links.
They can also try to get into your login form by using brute force attacks, which is one of the reasons why WordPress Security is so important.
Sometimes, they can even look for flaws in the contact form, so they can hijack it to send malware or spam to other people.
If you have this, these spambots are not only a nuisance but are very dangerous for the website, as well as your reputation.
After creating email filters in cPanel, you also need to choose the best contact form plugin for your WordPress website.
- Plugin Contact Form by WPForms
This plugin Contact Form can be downloaded for free and comes with built-in spam protection.

spam5
It is one of the best WordPress contact form plugins, it is equipped with hCAPTCHA, reCAPTCHA v2 and v3 features that allow you to block email spam.
Install and activate the WPForms plugin, you will need to create a contact form. Click WPForms – Add New, enter a name for your form, and select the “Simple Contact Form” template.

spam6
WPForms automatically creates a basic contact form with fields for name, email address, and message. You can add fields as needed which can be selected from the form on the left, then click “Save“.

block spam email3
Go to “Settings” and by default WPForms will activate “enable anti-spam protection” so that if spambots try to fill out a contact form then WPForms will reject it as spam.
- Settings reCAPTCHA to Block Spam Emails
What if there is still spam coming in? One easy way to stop spambots is to use reCAPTCHA which is available for free on the lite version of WPForms.
ReCAPTCHA is a free tool from Google and can be used in conjunction with the built-in WPForms system.
To add the reCAPTCHA checkbox to a contact form, click “Settings” in your WordPress dashboard and click the “reCAPTCHA” tab.

spam8
Next, select “Checkbox ReCAPTCHA v2” and fill in your Site Key and Secret Key. If you don’t have these two keys, please register on the Google reCAPTCHA page.
If there is a reCAPTCHA logo at the top then the reCAPTCHA contact form has been installed.

block spam email4