Download & Extend

Expand settings to include usernames and/or emails to allow through

Project:Reroute Email
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

This would allow a development site to be used by multiple developers, testers or client representatives while still blocking the majority of emails.

Comments

#1

Again, 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.

#2

Ok, 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...

#3

In that case, then allow both: usernames (and the settings looks up their email), and/or raw email addresses.

#4

Version:5.x-1.0» 6.x-1.x-dev
Status:active» needs review

I 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.

AttachmentSizeStatusTest resultOperations
reroute_email.module.txt2.45 KBIgnored: Check issue status.NoneNone

#5

I 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?

#6

Status:needs review» fixed

marking 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.

#7

re: "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...

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nobody click here