Skip to main content

Blocked email addresses

What it does​

Blocked Email Addresses is a list of addresses your forms refuse. When a visitor types a blocked address into an Email field and clicks Submit, the form isn't sent. The submission isn't saved, so it never reaches your Inbox and sends no email.

Use it for a sender who keeps sending junk through your forms, or for a whole domain that only sends spam. The list applies to every form of the store view.

Block Spam Email Addresses in Forms1:26Watch on YouTube

Before you start​

  • You know the addresses or domains to block, for example from the Email column of spam in your Inbox.
  • You can open Stores → Configuration in the admin.
  • You know whether the list is for the whole store or for one store view. To keep a different list on one store view, select it in Scope at the top of the configuration page before you change anything.

Steps​

  1. Go to Stores → Configuration → MageMe Extensions → WebForms.
  2. Click Spam Protection to expand it.
  3. In Blocked Email Addresses, put one entry on each line:
    • A full address, such as offers@example.net, blocks that address only. Capital and small letters don't matter.
    • A pattern between slashes, a regular expression, blocks every address that matches it. For example, /@example\.com$/i blocks all addresses at example.com. Put a backslash before each dot of the domain, end with $ so the pattern stops at the end of the address, and add i after the closing slash so letter case doesn't matter.
    • A pattern without slashes, such as *@example.com or the hint's example .*@example\.com, blocks every address it matches from start to end. Capital and small letters don't matter.
  4. Click Save Config.

A line that would match every address, such as * or .*, is ignored.

What you should see​

When a visitor sends the form with a blocked address, a message says "E-mail address is blocked:" followed by the address they typed, and the form stays filled in so they can change it. Nothing is saved: the attempt doesn't appear in the Inbox, and WebForms keeps no list or count of refused attempts.

Limits​

  • Only Email fields are checked. An address typed into another field, such as a Text field, isn't.
  • The list is the same for every form of the store view. There is no list for one form.
  • The message tells the visitor that their address is blocked, so a sender can try again with another address. To stop automated spam, use a CAPTCHA as well.
  • Spaces, commas and semicolons also separate entries, so an entry can't contain them.

Troubleshooting​

  • A domain pattern blocks nothing. A pattern without slashes must match the whole address: *@example.com works, @example.com alone doesn't. Between slashes, as in /@example\.com$/i, it can match a part.
  • Customers with good addresses are refused. A pattern may be too broad. For example, /example/i blocks every address that contains "example" anywhere. Make the pattern match the end of the address, as in /@example\.com$/i.

What's next​

Applies to WebForms 4Last reviewed October 14, 2026