The Task Is :
sending emails To users with a specific role to edit content which added by specific user
eg:send email to x when y add a new content
What I did: l
1-make a rule send_e_mail_to_editors_on_creation
2-Events:After saving a new content
3-Conditions:a.Content is of type"article"
b.And
c:Execute custom PHP code
the code:
$author_uid = token_replace('[node:author:uid]', array('node' => $node));
if
($author_uid =1)//the id of author of article
{
return TRUE;
}
else {
return FALSE;
}
4- actions: Send mail to all users of a role
the result
sending emails about all new content not content from user y only
Comments
Comment #1
saurabh.dhariwal commentedPlease follow the below steps:
Step 1: create custom rule event
Step 2: Alter your node presave and call your custom event which you create.
Create your custom code to retrieve user list and pass it in your rule event and if its multiple then call it in loop.
i.e.
Step 3: Create your rule with custom event and set action send to email where email will retrieve from $user object which pass in custom rule event.
Let me know if any query/concern regarding this.
Thanks!
Comment #2
tr commentedSuggestion was made in #1, original poster did not follow up.