To try it out, let's post a comment on a sample article. Sending e-mail might not work on a development site, but there are some tools available online to test e-mail sending, like for example the Test Mail Server Tool for windows. And to enable PHP mail on mac, you follow the steps described in this thread.

Create New Article

  • Go to “Content => Add Content => Article”
    • Title: Sample Article
    • Body: This is a sample article
  • (Save)

Post a new comment

In order to test both authenticated and anonymous comments, I’ll change a couple of permissions.

  • Go to “People => Permissions”
  • In the “Comment” section grant the following permissions to both “Anonymous User” and “Authenticated User”
    • Post comments
    • Skip comment approval (You may not want to grant this to anonymous users on your site, but it will make the demonstration easier.)
  • (Save permissions)

First, using the same account, I will be posting a comment in this article

Under add new comment,

  • Subject: Sample comment
  • Comment: I am the article author and this is a sample comment
  • Click "Save" (After saving comment, Rules will check if the comment and the node author is not the same, so this example should not send an email)

(No email has been sent)

Next, I will post a comment using another user account.

  • Subject: Sample comment
  • Comment: This is another user account and this is a sample comment
  • Click "Save" (After saving comment, Rules will be triggered and send a notification to the node author)

And now let's check the email. We can see the “from email”, “to email”, “subject” (with the title of the article), and the rest that we configured in the previous video.

Now, I’ll post a comment as an anonymous user.

  • Subject: Another sample subject
  • Comment: This is another sample comment
  • Click “Save”

This time, when we check our mail, we’ll see all of the same information as before, but the “from email” is set to our site-wide email address.