Unsubscribe links in notification emails

UPDATE: Unsubscribe links have been implemented as a feature and are available now in version 10.7 of Subscribe2 HTML.


TL;DR – I’m thinking of adding a feature allowing unsubscription links in the notification email in the next version. I hope I’ve found a good implementation for this feature as it isn’t straightforward. What do you think? Comments please… 😉


For a long time the Roadmap for Subscribe2 has stated that unsubscribe links in the notification emails has been considered and dismissed as a development route.

Why? Well, for a few reasons:

  • Subscribe2 is designed to be able to send individual emails but it can also be configured to send a single email to multiple recipients via the email BCC header – so the unsubscribe link would not be individual to each recipient
  • Subscribe2 can send up to 4 email types and in 2 formats, HTML and plain text – formatting can get messy when trying to implement a solution for all email types
  • Subscribe2 supports two user type, Registered and Public – the latter can click on a link to delete their email address but Registered Subscribers need to log in to their profile and change their setting – so a single link isn’t enough

So, where are we at right now?

Well, I think I have a satisfactory and workable solution now that I can spend more time developing Subscribe2 HTML while Subscribe2 is looked after by the folks at ReadyGraph. (See here for more about that split).

Basically, I have implemented a new {KEYWORD} called {UNSUBLINK}. This keyword is replaced by an unsubscribe link for Public Subscribers and a link to the ‘Your Subscriptions’ admin page for Registered Subscribers. These links are very basic in their implementation to allow for the plain text emails.

So, to allow greater control over the final output in the email there are also API filters for both links that passes both the generated link and the email type. This allows individual sites to use a little code to add some text and formatting to the link depending on the link and the email type. So for example (see below) you can return a nice sentence to Registered Subscribers with a word linked to the ‘Your Subscriptions’ page.

function custom_public_unsublink( $link, $email_type ) {
	if ( 'text' === $email_type ) {
		return "To unsubscribe click here:\r\n" . $link;
	} else {
		return 'To unsubscribe click here:<br /><a href="' . $link . '">' . $link . '</a>';
	}
}
add_filter( 's2_unsublink_public', 'custom_public_unsublink', 10, 2 );

function custom_registered_unsublink( $link, $email_type ) {
	if ( 'text' === $email_type ) {
		return "You may manage your subscription options from your profile\r\n" . $link;
	} else {
		return sprintf( 'You may manage your subscription options from your <a href="%s">profile</a>', $link );
	}
}
add_filter( 's2_unsublink_registered', 'custom_registered_unsublink', 10, 2 );

Finally then, this is the best solution I can currently think of, but I’m happy to hear some feedback on this before I push this feature out. Comments are open so let’s have some constructive feedback please. [Off topic comments will be deleted!]

Subscribe2 and Subscribe2 HTML

This post is all about some recent changes to Subscribe2 and Subscribe2 HTML and also clarifies the future of these two plugins a little.

As many of you may well have already noticed, Subscribe2 is now under new management. About 6 months ago I was the sole developer and supporter of Subscribe2 and Subscribe2 HTML and it was getting to be too much of a chore. I was approached and asked if I’d be willing to hand over control of Subscribe2 in return for a payment. I accepted. As part of that agreement this site was handed over too, but since it hasn’t been used I hope no one minds if I resurrect it for Subscribe2 HTML!

Subscribe2 has gone through some intensive development in this period and is now at version 10.17.2. It has added a new feature that can rapidly grow your subscriber base, the trade off being you agree (and your subscribers agree) to share their details with a third party, namely ReadyGraph.

Subscribe2 HTML has also gone through some changes and is currently at version 10.6. Features such as draft email in the Send Email page and the ability to send images and CSS as attachments to the notification email have been added.

So, essentially Subscribe2 and Subscribe2 HTML have now gone in different directions.

I still look after the code base for Subscribe2 HTML and will continue to do so. I also still hang around in the forum for the free version of Subscribe2 but I plan to start scaling this back and maybe lurking a little more.

The reason for me scaling back? Well, I cannot commit changes to the code anymore so cannot implement fixes for a start. Secondly, the majority of questions that are posed on the forums have usually been asked before, often this is many times before. So, the answers are usually available already. Finally, well as I said above the development and support was becoming a bit of a chore and I’m quite enjoying not feeling like I have to answer support questions!

So, good luck to the new developers in your venture and stewardship of Subscribe2. Best wishes and good luck to all of my users, code contributors, donators and supports over the years while I looked after Subscribe2. If you need me, you’ll find me looking after Subscribe2 HTML! :)

Subscribe2 v9.3 and v9.4

Version 9.3 9.4 of the Plugin in now available for download. This version has been tested on WordPress 3.8.2, 3.8.2, 3.9. It requires at least WordPress 3.3.

Version 9.3 contains the enhancements and bug fixes listed below.

If you use this plugin and find it useful please give it some positive feedback! Visit the WordPress.org site and give it a rating, tell me it works in the compatibility section and maybe consider making a donation to support future development!

An HTML version of the plugin that emails an HTML email to Public Subscribers is available here.

Continue reading

Subscribe2 v9.1 and v9.2

Version 9.1 9.2 of the Plugin in now available for download. This version has been tested on WordPress 3.8.1 and 3.8.2. It requires at least WordPress 3.3.

Version 9.1 9.2 contains the enhancements and bug fixes listed below.

If you use this plugin and find it useful please give it some positive feedback! Visit the WordPress.org site and give it a rating, tell me it works in the compatibility section and maybe consider making a donation to support future development!

An HTML version of the plugin that emails an HTML email to Public Subscribers is available here.

Continue reading

Subscribe2 v9.0

Version 9.0 of the Plugin in now available for download. This version has been tested on WordPress 3.6 and 3.6.1. It requires at least WordPress 3.3.

Version 9.0 contains the enhancements and bug fixes listed below.

If you use this plugin and find it useful please give it some positive feedback! Visit the WordPress.org site and give it a rating, tell me it works in the compatibility section and maybe consider making a donation to support future development!

An HTML version of the plugin that emails an HTML email to Public Subscribers is available here.

Continue reading

Subscribe2 v8.9.1

Version 8.9.1 of the Plugin in now available for download. This version has been tested on WordPress 3.5.1. It requires at least WordPress 3.1.

Version 8.9.1 contains the enhancements and bug fixes listed below.

If you use this plugin and find it useful please give it some positive feedback! Visit the WordPress.org site and give it a rating, tell me it works in the compatibility section and maybe consider making a donation to support future development!

An HTML version of the plugin that emails an HTML email to Public Subscribers is available here.

Continue reading

Subscribe2 v8.9

Version 8.9 of the Plugin in now available for download. This version has been tested on WordPress 3.5.1. It requires at least WordPress 3.1.

Version 8.9 contains the enhancements and bug fixes listed below.

If you use this plugin and find it useful please give it some positive feedback! Visit the WordPress.org site and give it a rating, tell me it works in the compatibility section and maybe consider making a donation to support future development!

An HTML version of the plugin that emails an HTML email to Public Subscribers is available here.

Continue reading