Send email to Role on new signup?
suffering drupal - April 27, 2009 - 00:16
| Project: | Action email role |
| Version: | 6.x-1.0-beta1 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hi, I think Action -> email to role is a great improvement :)
But unfortunately, it seems not to be available for Users from Triggers.
I only get System options, not Node options like under Contents... Is that correct or do I miss something?
I am starting a new website for a large group friends, so I would like the signed-up users with a certain role to be informed each time someone more signes up.
Thanks!

#1
Just use a usernode for each user, set a workflow, make an action to send an email on transition from (created)->first_state
#2
Hi dgtlmoon,
thanks for the suggestion. I'm rather newbie and don't really understand what your saying.
Anyway I downloaded workflow, installed it, went into it, didn't actually know what I was doing there, but now messages are sent indeed to the users in the role. Unfortunately though, it does not seem to understand the %user variable.
I don't know if that's because I didn't exactly do what you're referring to, or because Action -> email to role simply does not accept it.
I'll go through workflow to see if I understand better at a second attempt..
#3
I'd also like to have an e-mail sent when a new account is created. It seems extraneous to have to install usernode and workflow just to make this happen.
#4
+1 seems like a good request
#5
I've made a patch. It might have some problems as this is my first time editing a Drupal module (so feel free to fix, give me pointers). The main change is the action is now of 'system' type rather than 'node', now having functionality for 'nodeapi' and 'user'. I'm guessing it won't be too much trouble to modify so it can handle 'taxonomy' and 'comment' as well.
I've tested it out, both for sending an e-mail to all users in a role when a post is made, and when a new user signs up. Though I have not done any unit testing.
#6
HI
How do you apply this patch? The typical patch -p0 < your_diff spits errors. Am I missing something?
Thanks
Jon
#7
What errors is it spitting? I just tried the patch against the on-line version of the file just to be sure, and I got no errors with `patch -p0 < your_diff`. Maybe try `patch original_file diff_file`.