1. Mailjet
  2. Support
  3. Documentation

Template Management

Summary

What are Templates

A template is a predesigned layout that you use as the foundation for your mailings. Simply select a template that you like and then customize the content, colors, images to your liking. You can create a marketing template to use for your campaigns, a transactional template for your transactional needs, and an automation template to use in your automated workflows.

And with Mailjet, you can work on a new version of a template that is currently used in production, without impacting any live workflows and without having to create a duplicated version. How useful is that! No more duplicating templates when you want to make changes. You can create newer versions of a production template without impacting your users.

All templates are stored in your Template Management gallery which can be accessed from the Campaigns, Transactional or Automation menu.

The templates in your gallery are grouped by type:

From the Template Management Gallery, you can sort, search, create, delete, edit, export and download your templates.

And it is also where the magic happens: you can freely create newer versions of templates without affecting any currently in use…

Template Statuses: Draft vs Published

A template is either in ‘Draft’ status or in ‘Published’ status with the main difference being:

  • Only Published templates are available for use when creating a marketing campaign, a transactional email, or adding to an automated workflow.

  • Whereas Draft templates are not usable and can be freely edited from your template management gallery without any impact to existing workflows or users. And once your template is ready for use, you simply publish it.

The status for each template will be displayed in your template gallery….

And will be displayed next to the template name in Passport.

Create a Template

You can build a template for your marketing campaigns, your transactional emails or your email automation workflows.

There are several ways you can create your own template:

  • Save a template when creating your newsletter / campaign in Passport: At any time while designing your newsletter in Passport, you can save it as a template.
  • Use a Predesigned Template from the Gallery – Pick a template from our inspirational gallery and easily customize it with our drag-and-drop editor Passport. With Passport, it’s easy to design beautiful responsive emails.
  • Using one of Your Own Templates – Pick one of your own previously created templates as the foundation for a new template.
  • Use HTML – For designers, coders or anyone who uses HTML. You can import existing HTML code to create your templates in our HTML editor, or code one from scratch.
  • Use MJML CodeMJML is Mailjet’s markup language designed to reduce the pain of coding responsive emails. Import existing MJML templates directly into Passport, where changes can be made by anyone.

Once you customize the template to your liking, you can save it as your own template to use in future mailings.

[top]

For this example, we will create a template for your marketing campaigns.

From the My marketing templates page, click on the ‘Create a new template’ button.

You can use a template from the gallery, or you can pick a template that you’ve designed before.

For this example, we will use a template from the gallery.

You can scroll through the entire gallery, or click on a template category such as E-Commerce, Sports or Travel.

Click on the design that you like. Then enter a name for your template and press the ‘Use this template’ button.

On the Email and Sender Details, fill out the subject and sender information. This information will be used when previewing any test emails you may send.

You can also change the default ‘Give a summary of your email to your recipients’ preview text to help increase your open rates. Just click on the ‘Customize your preview text and increase your open rates’ link and enter the new preview text. (Psst. You can change the preview text via Passport at any time) ;)

Then click on ‘Save and design your template’ to continue.

Now the fun part - customizing the template with Passport. You can easily customize the template by reordering sections, adding content, tweaking colours and much more with the Passport Tools.

At the top of the template, you will see the Draft status. (Remember, Draft templates are only accessible in your template management gallery, and cannot be selected when creating a new campaign newsletter).

By default, your template will auto-save every 30 seconds. But you can save your template at any time, by clicking on the drop-down and selecting ‘Save draft’.

You can also:

With HTML

From the My Marketing Templates page, press the ‘Create a new template’ button.

Passport

Then click on ‘By coding it in HTML’.

Passport

You have two choices on creating your template: import your existing HTML code, or code it from scratch.

Passport

  • Import from File:
    Enter a template name, and then upload your HTML file (with extension .HTML). Then select how you want to edit your template – use Passport (drag-and-drop) or use the HTML code editor.
  • Code from scratch:
    With this option, you can code from scratch as well as copy in existing HTML code.

The next step is to enter the key sender details and email information.

Passport

Then you are ready to modify your template.

Once you are finished customizing your template, you can preview & test your template.

With MJML

From My Marketing Templates page, click ‘Create a new template’.

Passport

Then select ‘By coding it in MJML’.

Passport

You have two options on how to create your template: import your existing MJML code, or code it from scratch.

Passport

  • Import from File:
    Enter a template name, and then upload your MJML file (with extension .MJML). Then select your template editor: Passport (drag-and-drop) or the MJML code editor.
  • Code from scratch:
    Simply enter a template name and continue by clicking ‘Create’.

The next step is to enter the key sender details and email information.

Passport

Before you start editing your template, please be aware there are some guidelines to follow when using MJML in Passport.

Once you are finished customizing your template, you are ready to preview & test your template.

[top]

Preview & Test Your Template

From the Passport design page, click ‘Preview & Test’.

Passport

In the new model window, preview your template on a mobile phone, tablet or desktop.

You can also send a test email (up to 10 recipients at a time) to see how the email will appear to your clients. Please keep in mind that the look of your emails could vary between different email providers.

Passport

If you are testing your transactional template, there are two possible test options:

  • Send a test email (same as sending a test campaign)
  • Use the Send API

Passport

If you select the Send API test, a modal will appear showing the template version attribute that you need to add to your API call, along with sample code that you can easily copy.

Passport

Once you have finished previewing and testing, simply close all modal windows to return to Passport.

Passport

Save your Template (Save As New / Replace Existing Template)

While working on your template, you can choose to save it as a new template or replace a current existing template. From the Passport design page, simply click on the drop down menu and select ‘Save As’

Passport

To save as an existing template, simply select the template from the dropdown list. You also have the option to immediately Publish this new template, making it available in the gallery for use.

Passport

To save as a new template, simply enter the new template name. Again, you have the option to immediately Publish this new template, making it available in the gallery for use.

Passport

Once you’ve made your selection, simply click ‘Confirm’.

[top]

Save & Publish your Template

To have your template visible and usable in your gallery, your Draft template needs to be published.

From Passport, click ‘Save & Publish to gallery’.

Passport

Then agree to the confirmation message.

Passport

Your template has been published and can be used be selected when creating a new campaign.

Passport

At any time, you can edit a published template and not affect any current campaigns or workflows.

Edit a Published Template

Once a template is Published, you can still make changes to that template via Passport by saving your changes as ‘drafts’. Similar to the ‘Draft’template status, any saved ‘draft’ changes are saved to your Template Management Gallery only, and not available when creating a new campaign/email. Once your new version is ready, you simply publish those changes.

Passport

Let’s go through an example.

From your Template Gallery, click on a published template to edit it. (If you are in List View, simply select ‘Edit’ from the options menu.)

Passport

Make your changes in Passport. You will see a message under the “Published” status icon informing you that ‘You are editing the draft version. Save and publish to apply changes to your template’.

Passport

To save your new changes, click on the dropdown menu and select ‘Save draft’.

Passport

In the confirmation popup window, click ‘Save as draft’.

Passport

And that’s it - you have saved your changes in ‘draft’ mode!

Continue making changes to your template in Passport - and don’t forget to test & preview your changes.

Once you are ready to publish those changes (and overwrite the current published template in the gallery), simply click ‘Save & Publish to gallery’...

Passport

Then agree to the confirmation window. And that’s it - you’ve successfully updated a published template.

Passport

You can view your template publication history and even choose to revert to a previously published version.

[top]

View Version History / Restore Previous Version

There are 2 ways to view a template’s version history:

From the template gallery:

Passport

From Passport, by clicking on the drop menu:

Passport

The Version History Page will show details of your current version and up to 5 previously published versions.

Passport

(If you are viewing a template that has never been published or has been published once, only the current edited version will be shown.)

Click on any previous version to load it onto the screen.

Passport

To restore a previous version, simply click on the ‘Restore this version’ button.

Passport

From the confirmation window, you have two restore choices:

Passport

  • Restore the version directly into Passport to make changes

OR

  • Restore the version and publish it immediately

    Passport

Please note, if your currently published version has unpublished changes, restoring a previous version will overwrite these changes.

Passport

[top]

Managing Your Templates

The templates within your template gallery are grouped by type: Marketing, Transactional, Automation.

Passport

From your Template Gallery, you can manage all your templates including:

Note: Marketing Templates will be used for the examples in this section, but you can use any template type.

Grid & List Display

Display your templates in a grid view (default) or a list view.

Passport

Each template in the gallery will display:

  • Template Thumbnail
  • Template Name
  • Applied Template Labels (Premium Feature)
  • Last update information
  • Template Status: Draft vs Published

Passport

Hover your mouse over the last update information to view the exact date & time.

Passport

Sorting Options

From the ‘Sort by:’ drop down list, sort your templates by:

  • Name (alphabetically)
  • Last update
  • Most recently created
  • Created First

Passport

You can easily search for templates in the gallery using the powerful search tool. Enter multiple criteria at once and instantly see the results that match. Search by:

  • Template Name
  • Template ID
  • Template Label
  • Locales (search by short 2 letter abbreviation or the full language name)

Passport

Results will be grouped by Template, Labels, and Languages.

Passport

If you click on a template from results, you will be taken directly to Passport to edit it.

Passport

If you click on a label or locale from the results, it will be added as a filter to the search box. Please note, you can only select one locale as a filter, but can select any number of labels.

Passport

To remove a filter from the search tool, simply click on the ‘x’.

Passport

Edit an existing Template

You can update your draft templates, as well as make changes to your published templates.

Simply go to your Template Management gallery and:

  • In Grid View: hover over a template thumbnail and just click ‘Edit’.

    Passport

  • In List View: click on Options (the cog icon) and select ‘Edit’.

    Passport

Duplicate a Template

From the template gallery, click on Options (cog icon) then select ‘Duplicate’.

Passport

Please note, regardless if you are duplicating a published or draft template, the newly duplicated campaign will always be in draft mode.

Change a Template Name

From the template gallery, click on the Options icon then select ‘Rename’.

Passport

Delete

You can easily delete a template by clicking on the Options menu (cog icon) for the desired template and select ‘Delete’.

Passport

Export a Template

You can also export your templates to a file on your computer.

Simply click on the Options icon and select either Download HTML or Download MJML.

A file will automatically download to your computer, and you are free to use your template outside of Mailjet.

Passport

You can also export your template to your other galleries.

Click the Options icon and click on Export. Select where you want to copy your template and enter a new unique template. Then click ‘Export’.

Passport

[top]

Organize Your Templates with Labels (Premium Feature)

Apply meaningful labels to your templates for easier organization, sorting, and management.

For example, use labels to identify special events, holidays, seasonal templates, geographical locations, client groups and much more.

Passport

A label can be applied across all template types (Marketing, Transactional, Email Automation), and applied to as many templates as you wish.

And a template can have any number* of labels applied to it.

Passport

Please note, labels are a Premium Feature.

* Create up to 200 labels per Sub Account (or API Key).

Create a Label

Your labels can be accessed from the template gallery by clicking on ‘Manage Labels’ in the top right corner.

Passport

From the modal window, you can create your first label by clicking ‘Create label’.

Passport

Each label consists of a unique name, and an assigned colour. You can create your own label colour by clicking on the “+” sign.

Once ready, just click ‘Save’ to create your first label.

Passport

You are now free to create labels to your heart’s desire… which has been calculated to be 200 labels per sub-account/API key.

Manage Your Labels

From the Manage Labels window, all your existing labels are displayed in alphabetical order.

Passport

You can scroll through the list of labels, or type in the search field to have the most relevant results appear at the top of the list.

Passport

Edit Labels

To change a label name or label color, simply click on the ‘pencil’ icon. In the new ‘Edit label’ window, make your changes then click ‘Save’.

Passport

Delete Labels

To delete a label, click on the ‘bin’ icon, then agree to the confirmation message.

Passport

Please note, a label deletion is final and cannot be undone.

[top]

Apply & Remove Labels to a Template

From any template gallery, you can easily apply and remove labels from any template.

Template Gallery - List View

Click on the Options menu (gear icon), and select ‘Apply labels’.

Passport

From the modal window, scroll through the available labels, or use the search field to filter down the selection. If you select the wrong labels, just click on the ‘x’ to remove it. Once you’ve selected all the labels, then click ‘Save’.

Passport

The applied labels will appear just under the template name.

Passport



Template Gallery - Grid View

Hover your mouse over a template. Click on the Options menu (gear icon) and select ‘Apply labels’.

Passport

From the modal window, scroll through the available labels, or use the search field to filter down the selection. If you select the wrong labels, just click on the ‘x’ to remove it. Once you’ve selected all the labels, then click ‘Save’.

Passport

The labels will appear as a colored dot in the template thumbnail. Hover your mouse over the dots to view the full label names.

Passport

If you have applied more than 2 labels to a template, the first two label dots will be visible, and the additional number of labels will be indicated by a number.

Passport

Switching Between Premium & Basic Plans and Your Labels

If you create labels while on a Premium Plan and then downgrade to a Basic Plan, the labels will still be displayed on the templates, however you cannot update the labels.

Passport

Using MJML in Passport

When creating your emails with MJML in Passport, please keep in mind the following constraints:

  • The supported components are: mj-button, mj-column, mj-container, mj-divider, mj-image, mj-section, mj-social, mj-text
  • When creating Marketing Templates, an unsubscribe link is mandatory:
    • [[UNSUB_LINK_EN]]
  • When creating Automation Templates, at least one of the following links are mandatory:
    • [[WORKFLOW_EXIT_EN]] - Allows the recipient to exit the workflow.
    • [[WORKFLOW_EXIT_UNSUB_LINK_EN]] - The recipient can exit the workflow and unsubscribe from your contact list.

When you upload a MJML file in Passport, you will be able to customize it using our MJML code editor but you also have the option of using our drag-and-drop tool if your MJML template has followed these rules:

  • The size of the template is exactly 600px: mj-container max width = 600px
  • It does not contain any section with more than 4 columns
  • It does not use “mj-style”, as enabling to set style in the head part of a MJML document is currently not supported in Passport.
  • It only uses the following allowed components: mj-button, mj-column, mj-container, mj-divider, mj-image, mj-section, mj-social, mj-text

Passport

[top]

Try Mailjet now ?
Create an account - no engagement, no hidden fees