AddThis Academy

An ever-growing library of resources to help you become a better online marketer.

What Are Email Templates and How to Create Them?

What are Email Templates?

Email templates allow you to customize the formatting and text of emails sent by users who share your content. Templates can be text-only, or HTML and text, in which case the user’s email client will determine which is displayed.

As a publisher, your emails will use the default AddThis email template unless you choose to create your own. This initial AddThis template cannot be edited or removed, however it can be replaced as your default template, in which case any emails generated by users sharing your content using any AddThis code with your Profile ID will utilize new default template.

You can choose to override your current default template by specifying a different one in your AddThis code. Any emails generated by this code will use that template’s text and/or HTML formatting. You can even create multiple templates for different parts of a site or different domains!

Also, if you have created multiple AddThis Profiles, each profile has it’s own Email Templates. This helps publishers who are managing different configurations to more easily organize their implementations without having to create multiple AddThis accounts.

Creating a Custom Email Template

To create a new template:

  1. In the upper left header, select the AddThis Profile that you wish to create Email Templates for. If you have multiple Profiles, make sure you’re on the right Profile.
  2. Go to Profile Settings located in the upper right header, and select “Email Templates”.
  3. Select Add a template.
  4. Name your template (required); you will use this name to assign the template in your AddThis code – it may contain letters, numbers and underscores.
  5. Select the Subject of your email (required); you may use variables such as {{from}} to insert the sender’s email address.
  6. Edit or replace the text-only content (required); variables may be used in the text content of your email.
  7. Provide any HTML content that should be presented to users whose email clients can display HTML messages (optional).
  8. When you are finished, select Save.

Using Template Variables

The following variables can be used in the Subject and Text/HTML contents of email templates:

Variable Description
{{url}} Inserts the URL being shared
{{title}} Inserts the title of the URL being shared
{{note}} Inserts comment provided by the sender
{{from}} Inserts the sender’s email address

Values of custom variables can also be inserted using the following format:

To pass a custom variable from the AddThis menu at share time, you must configure the addthis_share variable, adding the email_vars object. For example, to set the value of var_CustomVariable:

var addthis_share = { email_vars: { CustomVariable: "A customized value" } }

Note: Be sure not to override your existing addthis_share variable when setting the custom email variables. This setting is also page-wide, so you can’t set different variables for different share buttons on a page.

Testing and Previewing Your Templates

You can send a Test Message using the default AddThis template, or any custom template you create. You will be asked for an email address, and a test message will be sent using the selected template. Note that your email client will determine whether you receive a text-only or HTML template. If you would like to see what your templates will look like, you can also select Preview while editing a template.

Using a Different Email Template in AddThis Code

To designate a different email template in your addthis_share object, use the following variable:

Here is an example of AddThis code designating an alternate template My_Template:

var addthis_share = { email_template: "My_Template" }

Selecting a Different Default Template for Your Account

The default template for your Profile will be applied to any emails shared using any AddThis code with your Profile ID unless a different template has been specifically called for in that particular instance of code. The email template supplied by AddThis is set to be your Profile’s default template unless you create your own template AND set it to be your Profile’s default.

To set a custom template to be the default template for your AddThis Profile:

  1. If you have not already done so, create a custom email template following the instructions above.
  2. After you have saved your template, you will see a list of available templates, including the AddThis default template and your new custom template.
  3. To designate your new custom template as the default template for your AddThis account, select the radio button labeled Default to the left; you will be asked to confirm your selection.

From that point forward, any emails shared using any AddThis code with your Profile ID will use your new custom default template, unless a different template has been specifically called for in that particular instance of code.

Last modified:  January 22nd, 2019