Build a User Management Page for Subscription Preferences and Opt-Outs

These are pages that users can access to edit their data and opt in and out of lists, or opt out of email completely. Sailthru’s policy is that unsubscribes are managed through Sailthru, and the opt-out page is Sailthru-hosted. This page will help you learn more about our opt-out levels.

Since Sailthru manages your unsubscribes, a default opt-out page is created for you with each account.

Page Requirements

Please note:

  • Link to the optout page in your template or campaign HTML using Zephyr syntax: <p><a href="{optout_confirm_url}">Unsubscribe here</a></p>
  • Checkboxes and radio buttons for adding/removing a user from a list will be automatically checked if the user is a member of that list and unchecked if they are not (when the subscriber arrives on that page from an email).
  • When a user unchecks a checkbox or radio button and clicks submit, they are removed from that list, and vice versa.
  • All the options (template vs campaign optout) of the default optout page are only visible when the page is linked to from a message. The best method to preview them is to send a campaign to yourself on a test list.

Create A User Management Page

  1. From Content tab, click Hosted Pages. Then click “New Page.”
  2. The Name of the new page will be part of the URL, so name it something user-friendly. For Type, select “User Management.”
  3. See the details in the subsections below for coding and configuring each aspect of the page. You can allow users to manage specific list subscriptions, triggered template optouts, and broader opt-out statuses.


  1. You must include a form with the method set to “post”. For example:
    <form method="post">
  1. There must be a submit button.  <input type="submit" value="Button text goes here"/>
  2. Per CAN-SPAM law, in addition to any other options, you must include the option to opt out of all email (Sailthru’s optout_all status) or opt out of just campaign email (optout_basic). This is explained in the Opt-Out Status section.
  3. If you will surface Zephyr variable values in a hosted page, it is a best practice to escape any potential HTML characters. You can easily achieve this by wrapping any variable names in the h() function to html-encode these values. For example, {h(brandName)}.

List Management

Allow subscribers to opt-in or opt-down by adding and removing them from specific natural lists which will receive specific campaign types (such as a particular newsletter).

Note that the method described in this section adds or removes users from individual natural lists. If your company determines which campaigns a user should receive based on Smart Lists that are dependent on certain user profile values (for example ‘all users where weekly=1’), you can instead set these profile values from your form.

You may include two types of inputs on your form: radio buttons and/or checkboxes. Checkboxes will allow a user to select multiple lists within a given list group, whereas radio buttons only allow the user to make a single selection within a group.

1. Radio buttons must have name="listgroup[]" and value="". The value is the list name to which the user will be added. In the example below, DailySports is a list name. The listgroup determines whether the radio buttons are related. Those with the same listgroup value will be considered part of the same group. In any case, the user can only select one option from a given group.

In the example below, if the sports daily and weekly lists are both a part of listgroup[A]. The subscriber can select either daily or weekly, since only one radio button in a group can be selected at a time. But the subscriber can select a daily or weekly for both sports and fashion, since sports and fashion are in different listgroups.

<p>How often do you want to receive the Sports newsletter?</p> 
<form method="post">
   <label><input type="radio" name="listgroup[A]" value="DailySports" />Every day</label> 
   <label><input type="radio" name="listgroup[A]" value="WeeklySports"/>Once a week</label> 
   <label><input type="radio" name="listgroup[A]" value="" />Do not send me the Sports newsletter</label>  

<p>How often do you want to receive the Fashion newsletter?</p> 
<form method="post">
   <label><input type="radio" name="listgroup[B]" value="DailyFashion" /> Every day</label> 
   <label><input type="radio" name="listgroup[B]" value="WeeklyFashion"/>Once a week</label> 
   <label><input type="radio" name="listgroup[B]" value="" />Do not send me the Fashion newsletter</label>

2. Checkboxes add or remove a user from a particular list; they do not belong to groups and need only contain name="lists[]". So if you wanted to give people the option to subscribe to any or all of the choices, you could do:

<p>Which newsletters would you like to receive?</p> 
<form method="post">
   <label><input type="checkbox" name="lists[DailySports]" />Daily Sports newsletter</label> 
   <label><input type="checkbox" name="lists[WeeklySports]" />Weekly Sports newsletter</label> 
   <label><input type="checkbox" name="lists[DailyFashion]" />Daily Fashion newsletter</label> 
   <label><input type="checkbox" name="lists[WeeklyFashion]" />Weekly Fashion newsletter</label>

If you want to pass an additional list addition or removal that is not visible to the subscriber as a checkbox, you can include the following:

<input type="hidden" name ="lists[List Name]" value="0" />

3. You also must include a button that submits the form and applies the user’s changes, like so:

<input type="submit" value="Button text goes here"/> 

Triggered Message Opt-outs

Note: This option has been deprecated and using .optout_template is not recommended.

For triggered emails, you can allow the user to opt out of the specific template used to send a given type of triggered message.

In the Sailthru default opt-out page, .optout_template is used to unsubscribe a user from the triggered email that they clicked to reach the opt-out page.

To allow a user to optout from a specific triggered email template without clicking through it, you can include a checkbox on your opt-out page:

<label for="notifications"><input type="checkbox" id="notifications" name="templates[mytemplatename]">My Template Name</label>

The items in bold can be changed to your preference. The template name is case-sensitive. Also note that it must be coded as name="templates[ ]" not “template.”

Note that this does not apply to campaigns built off a template. It is only for triggered email.

Opt-Out Status

There are three special values that represent opt-outs:

  1. .optout_basic – This opts the user out of all messages except triggered emails sent via templates you have designated “transactional”. Transactional emails include password resets, purchase receipts, and shipping confirmations. This is the recommended status to assign to users who opt out. You may see Optout (Marketing) in the UI for a user opted out of all marketing messaging.
  2. .optout_all – This opts the user out of all messages. This option will prevent the user from receiving any true transactional messages (such as password reset emails), which is why optout_basic is typically preferred.
  3. .optout_blast – This opts the user out of all campaign emails; they will still receive all transactional emails.
    Note: As of May 2018, optout_blast is a deprecated option and should not be used. To opt users out of marketing messages, use optout_basic, above.

In order to comply with spam laws and treat your users nicely, you must include an opt-out option that at least sets the user to   optout_basic status. You can offer an additional option that sets the user to optout_all . Generally, offering optout_all as the only option is not recommended.

We recommend offering a button that applies the optout_basic status to the user. The code could look something like this:

<form action="" method="post">
  <input type="hidden" name =".optout_basic" value="1" />
  <input name="action" value="Do Not Send Me Marketing Messages" type="submit" />

Confirmation Page

After a user submits the form, you can choose for the user to be redirected to a Sailthru hosted thank you/confirmation page or your own URL of choice. You can also use both options: redirect to a hosted page that then redirects to your own URL after a given number of seconds.

Sailthru Hosted Page

  1. If one does not already exist, create a hosted page of type Other as your Thank You/Confirmation page.
  2. When editing your User Management page, select the Actions tab.
  3. Next to Redirect, select the name of the Other page.

External URL

  1. When editing your User Management page, select the Actions tab.
  2. Next to Redirect, select External URL.
  3. Enter the URL in the box below.

Edit the Opt-out Page

  1. Under Content, click Hosted Pages.
  2. If the page is ‘locked’ (displays a gold lock), then click the page name “opt-out.” Otherwise click the wrench icon next to the “opt-out” page.
  3. Edit the HTML in the Code tab.
  4. In the Actions tab, select a page to redirect to from the Redirect dropdown. This page should thank the user once they have submitted the changes. (Make sure to create this ‘thank you’ page if you haven’t already — please see Build a Thank You/Confirmation Page.)

Link to your User Management Page

You can find the new URL for your page in the main Hosted Pages listing in My Sailthru. The URL will begin with your link domain, if one is configured for your account, and otherwise will begin with

To link to a User Management page in your messaging, follow the format provided in the Domains and URLs for Hosted Pages documentation.