Email Templates

Overview

UniSignIn sends emails to your readers, such as the sign-in code, password reset and welcome email. Every email works out of the box with a built-in template. You can change the subject, sender and design of each one, brand them per site, and see what was sent.

Emails go out through your own email server when one is set up.

Find your emails

Go to Features → Email → Templates. The list shows every email:

EmailSent when
WelcomeA reader registers.
One time passwordA reader signs in with a one-time passcode.
Change passwordA reader asks to reset their password.
Verification LinkA reader needs to verify their email address.
Account closedA reader closes their account.
SubscriptionA reader starts a subscription.
InvoiceA reader is charged for an order, a subscription payment or a top-up.
Renewal ReminderA subscription is about to renew or a free trial is ending.
Countdown ReminderA reader asked for a reminder on a Countdown.

The Status column shows which template is used:

  • Default: the built-in template.
  • Customized · On: your own template is used.
  • Customized · Off: you saved your own template, but the built-in one is used.

Click Edit to change an email, or Activity to see what was sent.

Edit an email

Under Basic configuration:

SettingWhat it does
EnableUse your own template instead of the built-in one.
SubjectThe subject line. Leave empty to use the default subject.
Preview textShown after the subject in most inboxes. Leave empty to use the start of the email.
From and From NameThe sender. Leave From empty to use the default sender of your email server.
Reply To and Reply To NameWhere replies go.

Preview text is used even when Enable is off, so you can improve the inbox preview of the built-in templates too.

Under Email Content, edit the HTML on the left and see a live preview on the right. Switch the preview between Desktop and Mobile.

  • Variables inserts a variable at the cursor, such as {{ user.first_name }}. Hover a variable to see what it holds.
  • Variables marked with * are required. For example, the One time password email must include the passcode. You can't save a template that misses a required variable.
  • If you use a variable that isn't available in this email, the template is saved with a warning and the variable shows empty.
  • Reset to default replaces the editor content with the built-in template. Nothing changes until you save.

Click Save Changes when you're done.

Send a test

Under Test email, enter an address and click Send test. The test uses the current content, even if you haven't saved it, with sample values for the variables. It is sent through your email server and the subject starts with [Test].

Template syntax

Templates use Twig. The basics:

<p>Hi {{ user.first_name|default('there') }},</p>

{% if subscription.trial_days > 0 %}
  <p>Your free trial lasts {{ subscription.trial_days }} days.</p>
{% endif %}

{% for link in brand.footer_links %}
  <a href="{{ link.url }}">{{ link.label }}</a>
{% endfor %}
  • {{ variable }} prints a value.
  • {% if %} and {% for %} add conditions and loops.
  • Filters change a value, e.g. default, date, upper, lower, trim and number_format.

Custom templates run in a restricted mode, so some advanced Twig features, such as including other templates, are not available.

Every email also gets a plain-text version automatically, made from your HTML.

Branding

Branding sets the look of the built-in templates for each site, so you don't need custom HTML to match your brand. Go to Projects, click Settings on the site and open the Branding tab. Email branding is below the site's own branding.

SettingWhat it does
Brand colourButtons and highlights.
Button textThe text colour on buttons.
BackgroundThe page background around the email.
Email logo URLThe logo at the top. Leave empty to use the site logo.
Footer textE.g. your company name and address.
Footer linksUp to 4 links, each with a label and URL. Click Add link to add one.

Colours use 6-digit hex values, e.g. #18181b. The preview on the right shows the Welcome email as you type. Click Save Branding to apply it.

Your custom templates can use the same settings through the brand variables in the Variables menu, e.g. {{ brand.color }}.

Email activity

Click View activity in the editor, or Activity in the list, to see the latest sends of an email.

ColumnWhat it shows
TimeWhen the email was sent, in your local time.
IDThe number of the send.
StatusSee below.
RecipientThe address it was sent to.
SubjectThe subject, with bounce, complaint or error details below it.
Message IDThe ID from your email provider. Click to copy it and look up the send in your provider.
StatusMeaning
SentYour email server accepted the email.
SendingThe email is on its way.
FailedYour email server rejected the email. Click the error to read it in full.
BouncedThe address doesn't exist or can't receive email.
Spam complaintThe reader marked the email as spam.
Not sent: suppressedThe address is on your suppressed list, see Email.
TestShown next to the status of a test email.

Bounced and Spam complaint need bounce and complaint handling, see Email.

Stay ahead in first-party data

Identity, consent, audience, and subscription insights for publishers. A few emails a month, no spam.

By subscribing you agree to our privacy policy.