Creating email templates involves a mix of content writing, HTML, and CSS expertise. Email templates should look good on different email clients and be responsive for mobile devices. Many non-technical customers will hire a front end or email template developer to build their templates. We also suggest testing your templates with rendering applications like Litmus before sending them to your customers.

There is currently a limit of 300 templates and 300 versions that may be created per account.

Transactional templates are account and subuser specific. Templates created on a parent account will not be accessible from the subuser accounts.

Create a Template

  1. Open the transactional templates page and click Create Template.
  2. Add a unique template name in the dialogue box and then click Save.

1.Open the Actions dropdown menu to create a new version.

  1. Click Add Version.

    The editor opens. From here, you can change the subject and the body of your email template.

The easiest way to get started with a new template is to use one of your previous email templates or a free template from the internet, and then modify it to fit your needs.

Editing Your HTML Template

Email templates are table-based HTML with inline or header styles, because some well-known email applications will only read table-based HTML.

To add a template:

  1. Open a new template in the Code Editoror Design Editorby clicking Actions and selecting New Version.

  2. If you selected the Code Edtior, copy and paste your HTML code into the code editor.

    If you paste in an email template, it is likely that you will overwrite the default and very basic email HTML that is provided in the code editor. If you selected the Design Editor, use the WYSIWYG editor with drag & drop modules to create your email template.

  3. When you’re done editing, click Save.

    Please double check that the content is formatted correctly before you send an email using this template.

Preview and Test Your Template

SendGrid suggests previewing and testing your template once you have created it to ensure that the format and layout look the way you expect.

To preview your template:

  1. Select Preview.

    A window pops out with a preview of the email that you’re going to test, with the option to view the template formatted for both mobile and desktop platforms.

  1. Click Send Test to send a test email using your new template.
  2. Fill in the recipient and subject line and then click Send.

Any Substitution tags will not be populated in this test, but you will be able to confirm the layout and format of your template.

Activate Your Template

To activate your template:

  1. Navigate to the template you wish to use and select the action menu.
  2. Select Make Active.

(% info %) A template can only have one active version at a time. If you’ve created a new version with different HTML that you want your customers to start receiving, you’ll need to make that Version “Active.” (% endinfo %)

Duplicate a Template

To duplicate a template:

  1. Navigate to the template you wish to use and select the action menu.
  2. Select Duplicate.

This creates a clone, giving it a name including the original version name, the word “copy,” and today’s date. This duplicate version will not be active until you activate it.

Unsubscribe Substitution Tags

You can use substitution tags to add links to your email to allow recipients to unsubscribe from only these emails, from all of your emails, and to manage their unsubscribe settings for your emails.

When using the group unsubscribe substitution tag, you must specify which unsubscribe group you would like to use. If you are sending your email via our SMTP API, please add the group ID into the X-SMTPAPI header. If you are sending via our Web API, please enter the group ID into the x-smtpapi parameter of the mail.send API call.

You must also specify which unsubscribe groups to include on the Manage Preference page if you are using the Manage Email Preferences substitution tag. For more detailed information, please visit our API Reference.

You can find your group IDs by looking at the Group ID column in the Unsubscribe Groups UI, or by calling the GET method of the groups resource.

Unsubscribe From This List

When you add the <%asm_group_unsubscribe_url%> tag to your email, we will replace that tag with the text “Unsubscribe From This List,” wherever the tag is found in your email. This link will allow your recipients to unsubscribe from the unsubscribe group that you attached to this email.

Unsubscribe From All Emails

When you add the <%asm_global_unsubscribe_url%> tag to your email, we will replace that tag with the text “Unsubscribe From All Emails,” wherever the tag is found in your email. This will allow your recipient to be globally unsubscribed from all of your emails.

Manage Email Preferences

When you add the <%asm_preferences_url%> tag to your email, we will replace that tag with the text “Manage Email Preferences,” wherever the tag is found in your email. This will allow your recipients to see your Unsubscribe Groups in a Subscription Preference page and then choose which groups they are interested in.