WordPress Plugin:

Comment Notification via email



Why do you need this plugin?

WordPress is a great blog platform. Many people read blogs and leave comments. However, as a blogger, he or she may not stay on the blog 24 hours a day, 7 days a week.

Fortunately, WordPress supports a tool called Webhooks that can do “push notification”. To put it in plain words, it is a notification that is triggered by some action happened on your blog, such as someone leaves a comment on your blog.

“Webhooks” is a very useful tool, but, there is no simple tutorial to teach me how to do it. Therefore, I put this simple tutorial and a sample script together. Hopefully, this can be useful for everyone.

How can this plugin help you?

This plugin can send email to notify you whenever someone leaves you a comment. If you have a smart phone that can receive email, you can be notified immediately.

All you need is a web site that supports PHP 5. If you do not have a web site, find a free web host instead.

Installation Guide

  1. Get the plugin from and unzip the file. You will find a file called “demo.php”
  2. Get a web site that support PHP 5.
  3. Use text editor to open the demo.php file. Modify email address (the red text in the code) in the demo.php. Please read the note below.
  4. Upload the revised demo.php to your web site.
  5. Add web hook in WordPress admin: go to “Settings” -> “Webhooks”.

Action: choose “comment_post”.

Field: choose any field you want. If you do not know which one you want, simple choose all. You can press “Ctrl” key then use mouse to choose different field.

URL: set full path to your demo.php. It looks like:…/demo.php


  1. Make sure the notification comes from This can prevent spammer from programming calling this script and trigger tons of junk emails in your inbox. If you have WordPress install on your own web, change this name.
  2. Change “sendmail_from”. This email should be the one from host email address
  3. Change “sendmail_to”. This email should be the one that you will check frequently.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s