Closed (fixed)
Project:
Reroute Email
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2008 at 19:35 UTC
Updated:
6 Dec 2008 at 00:15 UTC
Jump to comment: Most recent file
Comments
Comment #1
kbahey commentedAgain, if this is an option, I can include it if you write a patch for it.
Note that usernames is not realistic here, since hook_mail_alter() does not get passed a user ID. Unless you mean the user ID of a logged in user.
So, perhaps a text box with a list of email addresses that are allowed to go through would be the way to go.
Comment #2
jonathan_hunt commentedOk, I'll get to work on a patch. The reason I suggested usernames is that in many cases an administrator will know the username but may not know the email address (without looking it up). Based on a set of usernames this module could build a set of associated email addresses from the user objects and compare the outgoing To: address...
Comment #3
kbahey commentedIn that case, then allow both: usernames (and the settings looks up their email), and/or raw email addresses.
Comment #4
mikeryanI needed the ability to specify multiple pass-through email addresses on Drupal 6, so here's a patch to accomplish this. I didn't have a need to deal with usernames, so that part of the initial request is not implemented.
Comment #5
kbahey commentedI committed this, with a few modifications.
I was taken aback for a while by the "first email is special", but then it is documented and simple enough, so why not ...
I don't like the double ternaries at the very end. Can we make them simpler?
Comment #6
kbahey commentedmarking as fixed.
@jonathan_hunt, if you want that in 5.x then please create a backport from 6.x so the code is the same across version, not different features that will not carry forward in new versions.
Comment #7
mikeryanre: "first email is special" - a little laziness there, a separate field for the default email address may be cleaner, but I think this implementation is actually a little better for the environment where I'm using this.
Agreed on the ternaries (but then I didn't write them:-). The isset() doesn't appear necessary, the is_array() seems adequate...