Plugin Planet

Premium WordPress Plugins

Blackhole Pro enables you to receive an email alert for each blocked bot. The plugin enables you to choose the type of email alert, or customize your own using provided shortcodes. This tutorial explains how to “roll your own” custom email alerts.

Step 1: Enable email alerts

To enable email alerts, first enable the setting, “Email Alerts”. When enabled, this setting tells Blackhole Pro to send an email alert each time a bot visits the blackhole link (aka, “trigger”). Also make sure that the settings, “Email Address” and “Email From” are correct. Once email alerts are enabled, move on to the next step.

Step 2: Choose the alert type

For this step, visit the setting “Alert Type”. There you can choose which type of alert works best for you. Here are the choices:

  • Default alert — Includes basic bot info plus a whois lookup
  • Simple alert — Includes only basic bot info (no whois)
  • Custom alert — customize your own alert

If neither the default alerts or simple alerts are sufficient for your needs, select “Custom alert” and proceed to the next step.

Note that all email alerts are sent in plain-text format.

Step 3: Customize the email alert

Once you have selected the “Custom alert” option for the “Alert Type” setting, visit the “Custom Message” setting. There you can enter any text or shortcodes to create a custom alert that includes exactly the information that you require. Here is a list of Email Alert Shortcodes. Using the email shortcodes, you could craft a custom alert that looks like this:

Another bot blocked!

IP:           [ip_address] 
Date:         [latest]
Location:     [city], [region], [country]
Blocked hits: [hits]

Or you could throw the [whois] shortcode in there to include a complete Whois lookup, or whatever. Get creative like a boss.

Note that some bots purposely hide their information. So it’s perfectly normal to receive some blank/empty or [n/a] values for certain fields, from time to time.

Not receiving email alerts?

Most likely it’s ending up in the spam bin. Blackhole Pro uses the WP API for sending mail, and generally that functionality is known to work great. There are cases, however, where things like 3rd-party services (e.g., hotmail, yahoo, and gmail) will flag legit email as spam and even completely block it in some cases. So if you’re using a “free” email service, always check your spam bin.

That said, Blackhole Pro provides a possible solution. If your email alerts are not being received or are getting sent to the spam bin, visit the setting “Email From”. Here you can specify the address to be used in the “From” header for email alerts. If your email address is a domain-based address, then this setting should be the same as the previous Email setting. Otherwise, if you are using a 3rd-party email service, this setting should be a local, domain-based address.