Posted by matt@antinomia on July 17, 2008 at 6:32pm
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | system.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
It is not possible at the moment to send an email to multiple recipients without assigning multiple actions to a trigger. This patch allows a comma separated list of email addresses to be used, rather than forcing a single value. Patch is rolled against 5.x-2.5.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| actions_multiple_email_recipients.patch | 2.58 KB | Idle | FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch actions_multiple_email_recipients.patch. | View details | Re-test |
Comments
#1
Is there a patch out that will allow this for drupal 6.x?
#2
I'd also love to see this functionality! Has anyone worked out a solution for this in 6.x?
#3
I would also like this feature, so let's commit a new patch. The patch doesn't consider the default language of more than one user. Should we always send in the default site language for more than one user?
Or split the mail recipients and send mails separately? This can be a problem with the load...
#4
A D6 backport you can find here #572190: Allow multiple recipients in email actions.
#5
The last submitted patch, 284036-3.patch, failed testing.
#6
+++ modules/system/system.module 21 Jan 2011 18:39:21 -0000@@ -3158,12 +3160,12 @@ function system_send_email_action($entit
- $recipient_account = user_load_by_mail($recipient);
+ $recipient_account = user_load_by_mail($recipients);
This seems problematic -- I think you'd have to do a
foreach ($recipients as $recipient)or similar here.Powered by Dreditor.
#7
Thanks bfroehle, but the problem is a false positive test, because I renamed the variable "recipient" to the plural "recipients". I don't know if this is allowed, but i have now adapt the test against my patch, so it can proof the recipients vars correctly.
But the point you suggested is still open. I don't know if it is useful to load the language for every recipient and send mails separately.
#8
Comment in #6 still stands..
Also... I think at this point it's too late to rename 'recipient' to 'recipients' in any way, as some contributed modules might be using it...
But overloading 'recipient' to allow multiple emails might be okay.
#9
Okay so under the presumption that users would not use the action function as mass mail service (performance problem), I patch this with a foreach for individual user language support.
And there are two versions now:
D8) For code consistence and coding standard we rename the var "recipient" into the plural in the next major release of Drupal.
D7) For compatibility to contributed modules we hold the var name "recipient" in all other versions.
#10
Set it to need review for automatic testing...
#11
D8 branches seems to be ignored for testing, so let's take it back to D7 first. :(
#12
subscribe
#13
Moving this to D8 list...