I don't see this as a definitive patch, but I thought I would share it anyway. I wanted the actions email to be more informative and include information about the node in question. I created a simple replacement scheme: [[title]] is replaced later by the node title. I have no idea if there is an accepted Drupal practice here.
Also, on my setup, the actions emails were coming from Apache instead of the variable set in admin/settings.
$from = variable_get('site_mail', ini_get('sendmail_from'));
if (user_mail($recipient, $subject, $message, "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from")) {
| Comment | File | Size | Author |
|---|---|---|---|
| actions-node-replacement.patch | 2.93 KB | samo |
Comments
Comment #1
hystrix commentedThank you samo for this patch.
I was developing a workflow where the e-mail action was the only one that made sense, since the workflow was not related to drupal publishing at all. However, I too had the problem where the e-mail appeared to come from apache, and had hoped that I could include content and variables from the node.
Your patch worked perfectly for me on release 1.5.2.6 of the actions module. The variable substitutions bring real power to the drupal workflow module. I would imagine that the bracket scheme could conflict with freelinking and other module which filter based on that, but I am not sure as I am not using those.
I'll have to write up how I am using drupal's workflow module to track radio broadcast pre-production phases using flexinode. I added the comment logging contribution for partipants to track progress toward the broadcast. Now when one person is done with a task, they can use the drop down to transition to the next phase, the person who is responsible for the next step gets an e-mail, and the history of progress is tracked.
Thank you jvandyk for bringing workflow to drupal. Along with flexinode form creation, file attachments, etc, the potential is there for a very lightweight application platform. Before finding your module, I was heading toward an overly-wide flexinode table with check boxes for steps in the process..... to of course replace someone's manual tracking in a word document on their pc.
Comment #2
jvandyk commentedJump to this thread.