I have the Flag module set up so that the users can flag each other; there is a link shown on the user profile page. I would like to have those users who flagged another user to receive a notification by email when the flagged user post new content.

How can a user who is 'following' another user to disable email notification on new content?

I am using Drupal 7.

2 Answers 2


Notifications was still a bit wobbly on d7 when I checked last. I use http://drupal.org/project/privatemsg module which is nice because it keeps an online message as well as notifying via email (with permissions to change if you like so you can ignore users etc).

To set up the rule you add an event for the flag "A user has been flagged ....". Then any conditions you feel necessary and then Action "Send a message", recipient "flagged-user", author "flagging-user" and then whatever subject and body you like.

  • 1
    I tried to create a new rule using as you suggested. However, i am not sure how i can send an email to the user who flagged the user. I can send an email to the author of the newly created node (send email to flagged user), but that is not what i am after :)
    – blogook
    Jan 17, 2012 at 7:44
  • Did you install privatemsg module? Privatemsg module will take care of the emailing, instead you tell rules to send a message for the action. This means the user will get a message in their site inbox and will be auto emailed that they just received a message.
    – 7wonders
    Jan 17, 2012 at 7:54
  • I guess i need a bit more help. I am adding a new rule.
    – blogook
    Jan 17, 2012 at 16:46
  • I guess i need a bit more help. I am adding a new rule. Triggered event, when new content is added. Second step, condition. I select the user flag that i created with FLAG, as USER i select in dataselector, NODE:Author and as User on whose behalf to check, i am not too sure so i put node:author aswell. And third step (yes i have pvtmessage) I select to send a pvt message .. but nowhere i see that i can select for recipient: Users who flagged the Node Author
    – blogook
    Jan 17, 2012 at 16:53
  • Should be: 1. Add new rule -> Name = Send message when user flagged -> React on event - A user has been flagged under YOUR FLAG NAME. 2. Add Action - Send a message -> Recipient = flagged-user -> Author = YOUR WEBSITE NAME (you must switch to direct input mode to enter your website name) -> Subject = You have been flagged! -> Body = Hi [flagged-user:name], You have been flagged by [flagging-user:name], I think he likes you. -------------------- You do not need any conditions and your triggered event is the flag not when the content/user is added.
    – 7wonders
    Jan 17, 2012 at 17:46

Solution: I created FLAG users, so that users can flag each other.

RULES is set up as follows: New event, node new content.

Elements (3 items)
1st : Fetch users who have flagged a user
Parameter: Flag: Flagname..., user: [node:author]
Provides variables: Users who flagged (usersflagged) Add another

2nd : Add Loop
Parameter: Lijst: [usersflagged]
List item: Current list item (list_item)

3rd : Send E-mail
Parameter: To: [list-item:mail], Subject: Sitename | [node:author]..., Message: Dear [list-item:name], ..., From: [email protected]

Next step to discover is how to digest the mail. And I am wondering how much impact this rule will have on a busy site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.