Get access to free tutorials, exclusive content and more.

How to Block Unwanted Emails in WordPress

Are you receiving unwanted emails from a particular email address or domain? Have you ever asked yourself a question about how you can deny or blacklist a harassing email address in WordPress?

There’s no need to be banging your head against a wall. You can also stop your search because the solution is right here, right now. In today’s article, you’ll learn how to block unwanted emails in WordPress so you no longer receive annoying spam submissions. Let’s get down to the business!

Block specific email addresses or email domains from submitting your form

It is very easy to block a single email address or email domain that keeps harassing you with spam submissions. All you need is our free Ninja Forms core plugin and powerful Conditional Logic add-on.

Once you install the add-on, you’ll need to add the Submit button and the Email Address field to your form. Then, you head over to the Advanced tab within your form builder and open the Conditional Logic tab. Click on the Add New Condition and select the form fields you want to apply conditions.

In the example below, we applied the logic to the Email Address field and set triggers to hide the Submit button if the email address equals example@email.com.

blocking specific email address

In the other example, we blocked the Hotmail email domain using the conditional trigger Contains. This means any email containing the Hotmail domain will be blocked from submitting the form.

Additionally, you can also display an error message within an HTML field, if the user enters an email containing hotmail.com.

blocking email address

That’s all. You’ve just learned how to block an unwanted email address in your form. Nothing complicated as you may have thought at first!

Want to learn how to prevent duplicated submissions instead? Then head over to the article How to Prevent Duplicate Submissions in WordPress and learn how to prevent double submissions in WordPress with a Unique Field from Ninja Forms!

Hurray, no more harassing email addresses, thanks to conditional logic!

Finally, you can free yourself from all those unwanted email addresses that have been sending you spam submissions! As you can see, blocking specific email addresses or email domains with conditional logic is a walk in the park.

Are you intrigued to discover what our conditional logic plugin is capable of? Check the following articles and learn how to boost productivity using conditional logic in your WordPress forms!

The Conditional Logic add-on is a powerful integration that makes your WordPress forms interactive and creates a personalized experience. Unlike our competitors, you can purchase this add-on individually, but if you are looking for multiple add-ons, the Conditional Logic comes included in all our membership plans.

With a 14-day money-back guarantee, you’ll have plenty of time to test this add-on and see why it is among the users’ favorites. Give the Conditional Logic add-on a try today!