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:
<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!]

13 thoughts on “Unsubscribe links in notification emails

  1. Ideally, a page should have a “Thank you for subscribing” page, which also could allow a user to edit their subscription including unsubscribe.

    All the link has to be is a link to that page, which is configured in settings already 🙂

    It could use tokens to pre-fill any necessary information.

    1. Thanks James, a link to such a page might work but I get asked for a ‘one click’ solution so this won’t satisfy such users.

      Also, it might be a little confusing to have a link in an email which is to unsubscribe but links to a page titled “Thank you for subscribing”.

  2. Just setting this up and am totally baffled that there is no simple unsubscribe link. Basic and essential.

    1. Other example: instead of newsletter, you can create a new WP page called “Unsubscribe” and then use the page URL as your unsubscribe link/page in your emails to subscribers:

      http://fyibusiness.com/unsubscribe (site still in development)

      On the unsubscribe page, add short instruction like: “To unsubscribe, enter your email address and click “Unsubscribe”.

  3. Suggestion: in the user profile page, could you code it so that each user don’t see the “non-working” link to the ReadyGraph-app page/link:

    If (ReadyGraph-app) is enabled {then show ReadyGraph-app link } else { don’t show non-working link in the profile menu;}

  4. WOW. After upgrading the plugin, the Unsubscribe template email was gone in the new version.

    So here is my other suggestion: please, please separate the Email Templates for Unsubscribe/Subscribe emals, i.e. bring back the unsubscribe template. If one wants high subscription conversion, one needs to be able to have a template for the subscription activation email. For example, I want to include, “You can always unsubscribe at any time,” only in the “Subscribe” activation email. It would be weird/out of place if I include that sentence and other sentences in the “Unsubscribe” email.

Comments are closed.