Introducing the Unsubscribe module
I recently began sending out mass emails via Drupal, and I was surprised to find that no universal solution existed for providing an "unsubscribe" link on Drupal emails. Sure, you can use Subscriptions to manage actual subscriptions to content, or Notifications for activity notification preferences, but what if you just want to unsubscribe from email communication in general? What if your Drupal admins periodically send out mass emails manually, and you'd like to unsubscribe from even those?
Now there's a simple way to let your users unsubscribe from any Drupal-originating email. Introducing the Unsubscribe module. This module provides a simple unsubscribe form, and an "unsubscribe from email communications" checkbox on the account settings page.
How does the unsubscribing work? It's pretty simple. When a user unsubscribes, they are added to an "unsubscribe list," which is stored in the database. Whenever Drupal sends mail, the unsubscribe module will check to see if the recipient is on the unsubscribe list. If so, the email is blocked.
You can exempt specific modules from this blocking via the unsubscribe module's configuration page. By default, the "user" and "system" modules are exempted— you still want people to be able to reset their passwords. You can also use hooks to alter the list of exemptions, or override the blocking via a more complex set of conditions.
Additionally, I've added integration with:
- Core Actions
- User Operations
- Rules
- Views
A bit of a disclaimer— this module is only about a week old. I have plans to add a number of additional features, including token integration and a slightly more robust API. But for now, feel free to download and try it out! If you run into a bug, post it in the issue queue. I should be fairly responsive until I'm confident in a tried-and-true, stable release.
Feature requests welcome.
Have fun!
7.x,
drupal, unsubscribe, email, subscription