This article describes how to create a rule in Gmail that removes a message from your inbox and sends an email to the sender letting them know they’ve been blocked.

What to Know

  • Enable templates in Gmail: Settings > See All Settings > Advanced > Templates > Enable.Create reply, then More > Templates > Save draft as template > Save as new template.Create filter: Settings > See All Settings > Filters and Blocked Addresses > Create a new filter.

How to Enable Templates in Gmail

Instead of writing individual emails to the people who send you spam email, use a template to send an automatic response when you block someone’s email. Before you can use a template, though, you’ll need to enable templates in Gmail.

  • Sign in to your Gmail inbox.
  • Select Settings (the gear icon).
  • Choose See all settings.
  • In the Settings screen, go to the Advanced tab.
  • In the Templates section, select Enable to work with Gmail templates.
  • Select Save Changes for the change to take effect.

Create Your Response Template

You’ll need a template to send as a response each time you block an email sender. This way, you’ll only write the message once.

Sign in to your Gmail inbox.

Select Settings (the gear icon).

Choose See all settings.

In the Settings screen, go to the Advanced tab.

In the Templates section, select Enable to work with Gmail templates.

Select Save Changes for the change to take effect.

  • Select Compose (the plus sign icon located in the upper-left corner).
  • In the New Message window, type a general message that lets the sender know that you’ve blocked them.
  • Select More (the three stacked dot icon located in the lower-right corner of the New Message window).
  • Select Templates > Save draft as template > Save as new template.
  • Enter a descriptive name for the template, then select Save.

Create A Filter

Next, you’ll create a filter to block spam messages and set it up with the new template response. If you have an existing spam filter, edit it to include the template response.

Select Compose (the plus sign icon located in the upper-left corner).

In the New Message window, type a general message that lets the sender know that you’ve blocked them.

Select More (the three stacked dot icon located in the lower-right corner of the New Message window).

Select Templates > Save draft as template > Save as new template.

Enter a descriptive name for the template, then select Save.

  • Select the Settings gear icon.
  • Select See All Settings.
  • Select the Filters and Blocked Addresses tab.
  • Select Create a new filter.
  • If you have an existing filter, edit it instead.
  • Set the criteria Gmail will use to filter your mail. Choose a sender email address, subject, or certain words in the body of the email. Combining these will only filter email that meets all the criteria specified. When you’re done, select Create filter.
  • Choose the actions Gmail should take when it receives an email that matches your criteria. Choose as many as you like, but to eliminate spam, choose Delete it. Then, select Send template, and choose a spam response template.
  • When everything looks good, select Create filter to finalize the new filter.
  • The filter creation dialog will close, and the filter list will update to show your new filter. Next time you receive a message that meets the filter criteria, Gmail will take the actions you specified.

Select the Settings gear icon.

Select See All Settings.

Select the Filters and Blocked Addresses tab.

Select Create a new filter.

If you have an existing filter, edit it instead.

Set the criteria Gmail will use to filter your mail. Choose a sender email address, subject, or certain words in the body of the email. Combining these will only filter email that meets all the criteria specified. When you’re done, select Create filter.

Choose the actions Gmail should take when it receives an email that matches your criteria. Choose as many as you like, but to eliminate spam, choose Delete it. Then, select Send template, and choose a spam response template.

When everything looks good, select Create filter to finalize the new filter.

The filter creation dialog will close, and the filter list will update to show your new filter. Next time you receive a message that meets the filter criteria, Gmail will take the actions you specified.

Get the Latest Tech News Delivered Every Day