Comment Notification via email
1 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.
2 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.
3 Installation Guide
- Get the plugin from http://www.bp-toys.com/share/demo.zip and unzip the file. You will find a file called “demo.php”
- Get a web site that support PHP 5.
- 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.
- Upload the revised demo.php to your web site.
- 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: http://www.your-web-site.com/…/demo.php
- Make sure the notification comes from WordPress.com. 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.
- Change “sendmail_from”. This email should be the one from host email address
- Change “sendmail_to”. This email should be the one that you will check frequently.