I was annoyed by the inflexibility of action_send_email()
with this patch you can assign
- Roles
- Users
- email-addresses (not just one)
- and the author
to be the recipients
some small cavearts:
- currently there is no update path for the old recipient
- the autocomplete does only work for the first user (I thought that autocomplete works for the second username inputted too... but it looks like I am not right in this point)
- maybe i should replace the "Individual email-adresses"-field with the textarea known of organic groups (for example: http://groups.drupal.org/og/invite/90)
- i think the UI could look better... but i have no ideas for now.
please review! (screenshot attached)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | send_email_advanced.patch_3.txt | 12.94 KB | Tobias Maier |
| #4 | send_email_advanced.patch_2.txt | 11.68 KB | Tobias Maier |
| #3 | send_email_advanced.patch_1.txt | 10.53 KB | Tobias Maier |
| #2 | send_email_advanced.patch_0.txt | 10.52 KB | Tobias Maier |
| #1 | send_email_advanced.patch.txt | 10.28 KB | Tobias Maier |
Comments
Comment #1
Tobias Maier commentedand here comes the patch
Comment #2
Tobias Maier commentedfixed some typos, spelling errors, etc.
Comment #3
Tobias Maier commentedI think it is not bad to check_plain() the messages' body and title
renamed some strings again.
Comment #4
Tobias Maier commentedthis version is not very good tested
the upgrade path is completely untested...
* only active (non-blocked) users get a message
* small improvements
* upgrade path
Comment #5
Tobias Maier commentedfixed upgrade path (but untested again)
fixed some minor errors
I would be really happy if someone would comment on this... :/
If you would say that this is too much for an example action then I suggest du rename this function to action_send_emai_advanced() and "Send Email (Advanced)"
or to rename the old function to action_send_emai_simple() or action_send_emai_example() and "Send Email (Simple)" or "Send Email (Example)"
Comment #6
mfredrickson commentedPerhaps the best place for this action is:
http://drupal.org/node/48737
Comment #7
Christoph C. Cemper commentedthanks, but still a lot of variables missing in that patch...
e.g. I had to add
'%orig_url' => $base_url . '/node/' . $node->nid,
'%edit_url' => $base_url . '/node/' . $node->nid.'/edit',
after
'%node_url' => url('node/' . $node->nid, NULL, NULL, TRUE),
just to mail the non-aliased urls to the users...
Comment #8
ashtonium commentedI would suggest fully testing your patch before submitting it, in order to cut down on submitting a series of buggy patches. Looks like it still needs some work, so I've changed the status. I've been looking into extending the email action as well so rather than create a separate issue, I'll just add onto yours.
I like the idea of creating this as action_send_email_advanced rather than modifying action_send_email, which may go along with mfredrickson's suggestion. Either way, it would be good to post this as a handbook page after the action is finished and fully tested.
Comment #9
moshe weitzman commentedI would also like to have available the prior and destination workflow states (with names), and the person who is making that transition. perhaps this could be done in a contrib module
Comment #10
drewish commentedthe patch won't apply cleanly. looks like there's been some updates to the module.
Comment #11
dgtlmoon commentedwont apply here, heres the output, sounds like a great feature!
cat send_email_advanced.patch_3.txt|patch
patching file actions.inc
Hunk #1 FAILED at 359.
Hunk #2 FAILED at 378.
Hunk #3 FAILED at 460.
3 out of 3 hunks FAILED -- saving rejects to file actions.inc.rej
patching file actions.install
Hunk #2 succeeded at 32 with fuzz 2.
Hunk #3 succeeded at 40 with fuzz 2.
Hunk #4 FAILED at 54.
Hunk #5 FAILED at 80.
2 out of 5 hunks FAILED -- saving rejects to file actions.install.rej
Comment #12
seakayjay commentedI'm looking forward to this feature. subscribing...
Comment #13
drewish commentedcode for html mailing has gone into core and since actions is also in core i think it's safe to mark this as either won't fix (as a contrib module) or fixed.
Comment #14
(not verified) commented