Skip to main content

How to add an unsubscription management link to an email

The extension includes a dedicated Unsubscription Management Page that lets recipients choose exactly what they want to unsubscribe from, instead of being silently removed with a single click.

When a recipient opens this page, they can select any combination of:

  • Emails from this series — unsubscribe from the specific trigger that sent the email
  • All email series — unsubscribe from all Follow Up Email triggers
  • Newsletter — unsubscribe from the Magento newsletter

After submitting the form, a confirmation page is displayed.

<a href="{{ url.unsubscriptions_url }}">Manage email preferences</a>

PHP callout syntax

<a href="<?php echo $this->getUnsubscriptionsUrl() ?>">Manage email preferences</a>
tip

The link is hash-based and unique per email. It does not require the recipient to be logged in.
The page automatically identifies which trigger the email belongs to using the hash from the queue record.

Page behavior

  1. The recipient's email address is shown at the top of the page.
  2. If the email was sent by a specific trigger, the option Emails from this series is pre-checked.
  3. The recipient selects what to unsubscribe from and submits the form.
  4. A success page confirms that preferences have been saved.
note

If the hash in the link is missing or invalid, the recipient is redirected to the store homepage with an error message.

MethodBehavior
getUnsubscribeUrl / url.unsubscribe_urlImmediately unsubscribes from the current trigger (no confirmation page)
getUnsubscribeAllUrl / url.unsubscribe_all_urlImmediately unsubscribes from all triggers (no confirmation page)
getUnsubscribeNewsletterUrl / url.unsubscribe_newsletter_urlImmediately unsubscribes from all triggers and the Magento newsletter (no confirmation page)
getUnsubscriptionsUrl / url.unsubscriptions_urlOpens the management page — recipient selects what to unsubscribe from

Use the management page link when you want to give recipients granular control and reduce unsubscribe rates by offering a partial opt-out.