In drupal 6, actions and triggers have been added to the core. But what are actions used for? Lets say, you wish to receive an email every time someone leaves a comment. This can be accomplished with actions in less than 60 seconds. Here's how:
- Go to Administer > Site configuration > Actions
- Scroll down to "Make a new advanced action available" and choose "Send email..."
- Type your email, a subject, a message and hit save
- Click on the create button
- Go to Administer > Site Building > Modules
- Enable Trigger module
- Go to Administer > Site Building > Trigger
- Click on the Comments Tab
- In the "Trigger: After saving a new comment" section choose the "Send email..." action we just created
- Click on the Assign button
That's all. Make sure that you have given the necessary permissions for posting comments to your users and test it by adding a comment.