Unsubscribe Link Duration

Created on 16 September 2024, 3 months ago

Problem/Motivation

Is there any way to change the unsubscribe Link's duration.
After 24h it redirects to a resubscribe form instead of the unsubscribe form.

Steps to reproduce

Send Mail with unsubscribe Link, wait 24h then click unsubscribe Link.

Proposed resolution

Add token to change expiration time

πŸ’¬ Support request
Status

Active

Version

4.0

Component

User interface

Created by

πŸ‡©πŸ‡ͺGermany koswaldk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @koswaldk
  • πŸ‡©πŸ‡ͺGermany ammaletu Bonn, Germany

    This happens in our projects, too. It is especially bad for subscribers without an account, as they can't simply go to their user profile and unsubscribe from the newsletter. I haven't tested yet if this happens for subscribers with an account as well.

    In our case, the unsubscribe link is the only link in the mail to manage the subscription. That effectively leaves no way to unsubscribe for the users, except writing to the admin. This probably has legal consequences, if we keep sending newsletters to users who don't want to receive them.

    This just happened on Drupal 10.2.7 and Simplenews 3.0.0-beta5. I still have to test whether this also occurs with the new version 4.1.0.

  • πŸ‡©πŸ‡ͺGermany ammaletu Bonn, Germany

    I could not reproduce this with Drupal 10.2.10 and Simplenews 4.1.0. Is there a reason why the previous version 4.0.0 ist still listed as "Recommended by the project’s maintainer"?

  • πŸ‡«πŸ‡·France flocondetoile Lyon

    There is a parameter in simplenews.settings.yml named "hash_expiration" which is hardcoded with 86400 value (so 24h).
    This settings expires subscribe / unsubscribe links sent in a newsletter.

    This parameter is not configurable in the settings UI.

    I guess that make this setting configurable would allow to set the period after which the links are not valid anymore. But 24h (the default value) seems really short for newsletters.

    A simple workaround is to change this settings in the config file, and then reimport this configuration (drush cim).

Production build 0.71.5 2024