Skip to main content
Every customer-facing email your shop sends is a Nunjucks template you can replace. Templates are edited under E-mail Settings, and each one starts from a SellAuth default until you override it. Editing templates requires a plan that includes it. For connecting your own sending server, see Email Settings.

Structure

A template supplies two things: a subject and a body. Both are written as block tags, which is how SellAuth splits a single file into those two parts. You do not extend anything or write an HTML document, because the shared layout provides them.
The subject block becomes the subject line and is rendered as plain text. The content block is the body, and is inserted into the shared layout. Both are required.

The base layout

Base Layout is a template like any other, and it wraps every email your shop sends. It carries the document, the styles, your shop’s branding header, the social links footer and the unsubscribe link, and it renders each email’s body where it says:
Editing the layout changes every email at once, so it is where branding belongs: colours, fonts, header, footer. It only receives shop, so anything invoice-specific has to go in the individual template.
Email clients are far less capable than browsers. Table-based layouts and inline styles are used throughout the defaults for a reason, and a layout written like a modern web page will break in Outlook. Start from the default and change it rather than replacing it wholesale.

Available templates

Each template receives its own set of variables, listed below. shop is available everywhere.

Invoices

Feedback

Subscriptions

Support and account

Growth

Helpers

Email templates get no SellAuth theme filters. The full helper set is:
Standard Nunjucks filters are available. See Nunjucks for the language itself.

Writing a template

Content that came from you or the buyer is escaped by default, so fields holding HTML need | safe:
Loops work as they do in themes:
Guard optional values. A template that assumes one will render badly when it is missing:

Reverting

Deleting your version of a template restores the SellAuth default, including any improvements shipped since you overrode it. Useful for templates you customised once and no longer maintain.

Next steps

Email settings

Sending these emails from your own domain.

Nunjucks

The template language reference.