Want to send Email notification to all registered user , when some new content is creating/updating. how i can do that in drupal7
you can use rules http://drupal.org/project/rules to do this
Everything Opensource way
Rules is best for this, it depends on Entity API.
Simple download and enable them from Admin -> Modules
Now follow Admin -> Configuration -> Workflow -> Rules
Click on Add new rule
Define name e.g. "New content email notification" , select 'After Saving new content' from React on event select box and hit the Save
On the next page, event is already defined, No condition is required to define here, Head on to Action section and hit Add action
Enter recipient email address in the To field box
Populate Subject and Message, From fields. (A number of Replacement pattern are available to include in the text)
e.g. New content [node:title] added by [node:author] of type [node:type] on [node:created].
Hit the save
On the settings fieldset, make sure to check Active check box.
geetha, you post was helpful. thanks.
In my case I need some more helps.
Once the content created I need to send emails to 2 registered users with activate/reject links. These two members will be selected when adding the content.
The referees can click on the links. Once they clicked there is a field in the created content called "Referee 1 status" and "Referee 2 status". It should be updated with the specific action ("Approved" or "Rejected").
Can you please help me?
Thanks in advance.
You can do it with ation and trigger module. and there you can use token to send the links for the approval and rejection or you can create your own token to generate these links but i am sure the existing cck tokens will be enough for what you want
First, you have to set up a RUle to send emails when a new content is created. You have to pass node nid in query string in the email links.
Then, create custom MENU_CALLBACK (in a custom module) and do...
$node = node_load($nid);
$node->status= 1; // Here i m changing just the status, you can do a lot more.
Since you just need two emails, so creating separate rule for each and passing some flag(variable) in the email link as query string will be helpful to identify users..
Hope this will help you.
See all hot content.
Drupal is a registered trademark of Dries Buytaert.