Useful Comment Notification Emails for Drupal Site Admins
I have, for some time, used the amazingly dexterous Rules module on my Drupal sites to receive email notifications when new comments were posted. I set up a Rule in the admin interface which would send an email if a new comment was saved on the site.
In the 'Message' section of the Rule's 'send email to arbitrary address' action, I would include a link to the commented-upon node, as well as the body of the comment text.
However, I wanted to also have a couple convenient links included: one link to allow me to quickly delete the comment (if the comment was spammy), and a link to edit the comment (sometimes I need to see the email address of the author, or change some wording if it's mildly inappropriate).
Luckily, Rules is well-acquainted with the similarly amazing Token module, so all I had to do was enter the following in the 'Message' (replacing what I had):
There's a new comment on the post [node:title-raw]. -------------------------------------------------------------------------------- By: "[comment_author:user-raw]" "[comment:comment-body-raw]" -------------------------------------------------------------------------------- Commented-upon node: http://www.lifeisaprayer.com/node/[node:nid] Comment Administration: Delete this comment: http://www.lifeisaprayer.com/comment/delete/[comment:comment-cid] Edit this comment: http://www.lifeisaprayer.com/comment/edit/[comment:comment-cid]
Simple, but brilliant. Rules could be described that way.
Note: Check out this drupal.org page for more advanced comment notification options.

Comments
Great; many thanks for posting this! The only problem left is that I'm getting HTML code showing up in the text of the received e-mail, something I'll research.
That's strange behavior. There shouldn't be any in this simple of an email. However, could be something caused by using mimemail on your website.
Advancing the faith.
Post new comment