Unsubscribe links in automated emails
Let your customers unsubscribe from automated emails, such as follow-ups after purchase and product review requests, with a single link in the email.
You can add an unsubscribe link to your automated emails, so your customers can opt out of receiving them. This applies to two email types: Email after purchase (after_purchase_mail) and Product reviews (product_review).
How it works
When the customer clicks the unsubscribe link, Shoporama records that they no longer want that email type. The customer is then redirected to the front page of your store with a confirmation.
Unsubscribe URL format
The link that unsubscribes the customer has the following format:
Email after purchase:
https://din-shop.dk/unsubscribe?email=kunde@example.com&type=after_purchase_mail
Product reviews:
https://din-shop.dk/unsubscribe?email=kunde@example.com&type=product_review
Redirect after unsubscribing
Once the customer has unsubscribed, they are redirected to:
https://din-shop.dk/?unsubscribed=after_purchase_mail https://din-shop.dk/?unsubscribed=product_review
You can use the $get.unsubscribed variable in your theme to show a confirmation message on the front page.
Example Smarty code for your email template

Insert the following at the bottom of, for example, after_purchase.html:
<p><small><a href="<{$webshop->getUrl()|escape}>/unsubscribe?email=<{$order->getEmail()|escape}>&type=after_purchase_mail">
Unsubscribe from these emails
</a></small></p>
And likewise in product_review_mail.html:
<p><small><a href="<{$webshop->getUrl()|escape}>/unsubscribe?email=<{$order->getEmail()|escape}>&type=product_review">
Unsubscribe from these emails
</a></small></p>
Note: Customers can only unsubscribe from after_purchase_mail and product_review. Other email types, such as order confirmations and shipping notifications, cannot be unsubscribed from.
Related articles
Which emails does Shoporama send to my customers?
An overview of the automatic emails Shoporama sends to your customers: order confirmation, shipping confirmation, abandoned cart, product reviews,...
Export customers who bought a specific product
How to export a list of customers who have bought a specific product, or email them directly from the product page.
Back-in-stock emails: Notify customers when products are restocked
Learn how to set up back-in-stock email notifications, so your customers find out when sold-out products are available again in your Shoporama store.
Related features
Newsletter system: send professional newsletters directly from Shoporama
Built-in newsletters with A/B testing, segmentation, product blocks, and statistics. Integrates with Brevo, Klaviyo, and HeyLoyalty. Included in...
Email marketing
Integrate with Klaviyo, Brevo, Mailchimp, Ubivox, or Campaign Monitor, or use Shoporama's own newsletter system. Automatic syncing and event tracking.