Support to blacklist email addresses from being invited again (module + hook patch attached)
neilnz - April 2, 2009 - 23:50
| Project: | Invite |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
Hi,
For our site, we needed to give invitees the option not to be sent any more invites. I have written a module, invite_optout (for Drupal 6) which provides this support by creating a table containing email addresses that don't want any further invites. There is integration with the admin UI to add/remove addresses manually, and it adds a new token to provide the link to opt out.
This required a small patch to invite.module so other modules can block an email address from being invited. This patch is attached.
I think it would be nice if this module was distributed along with the invite module as a contrib, rather than me contributing it separately.
Feedback welcome!
| Attachment | Size |
|---|---|
| invite.module.patch | 1.13 KB |
| invite_optout.tar_.gz | 3.05 KB |

#1
Any interest? Feedback?
#2
I think your module, or at least the functionality to not invite people twice, is crucially important. In fact, I would hope that the invite module itself would default to this behavior.
Consider that one vote from me in that regard.
THANKS for sharing your code.
#3
Seems like a logical addition to the module .. perhaps more folks will become interested if they get tagged as spammers and their ip blocked.
As is stands there is no way to facilitate a blacklist functionality, which IMO is paramount when dealing in email blasts.
When I get some time I will test it tho I would rather test it knowing its going into the module rather than have to maintain a patched version of invite.
Perhaps if the maintainers do not wish to add this (no harm in that) you can fork the module and add your functionality into it as it seems it would lean things more towards a proper email campaign app than a user invite app. Maybe even switch it up more in that direction to make sure its a truly different module. I have been digging for days to find something to facilitate a proper html email campaign and this is the closest thing ive found for drupal ... albeit missing some functionality like your blacklist bits, its still pretty cool nonetheless!
Cheers!
#4
Thanks for the kind words :)
I'm wondering if maybe the blocking hook should have used drupal_alter(), but that's just a style thing really.
@macrocosm, typically I think people do the mass mailing stuff from another system like PHPList or (in our case), Interspire Email Marketer, which they then rig into their Drupal contact list somehow. There's also simplenews (http://drupal.org/project/simplenews) which can do mass mailing natively in Drupal.
Some modules are distributed along with a patch for their upstream module (which I would have to do if I released this module separately), but it would be nice if the Invite maintainer could merge my patch (or one with similar functionality).
#5
Yea .. simplenews is cool ... and I am using it but it lacks one thing that Invite does handily, and that's sending to non-users (at least as far as I can tell). From time to time we have lists to mail to and dont want to force them into being a member or force their opt-in inside the site to receive it .. the other bonus is that Invite will give them the option to join if they wish and does so quite nicely with the tracking and all that.
I have PHPlist but it seems a bit redundant for 'most' of our blasts .. mainly because they are highly focused quite small lists of emails. I wanted something native to drupal without a lot of hoopla. Like I said before, I am using simplenews (with htmlmail & emogrifier) which works nicely & also works well with Invite I should say. So a lot of the phplist functionalities are already up and running inside drupal .. albeit without blacklists!
So far im pretty happy with the stack, tho I think your correct in your phplist point on large blasts.... there is even http://drupal.org/project/phplist which integrates it into Drupal nicely I suppose. Maybe Ill give that a shot at some point I dunno.
Cheers!