Templates for your messages. They can be reused within the same campaign but can also be used in other campaigns if they are made generic enough for your needs.  You can use one of our pre-made ones, or one of your own.


Dynamic commands

Mails can be dynamic on a per recipient basis. To add dynamic data to a mail you use one of the commands available in the content editor's dropdown menu or simply type them in yourself. You'll read all about  'em here...

A command looks like this: {$command}, where "command" is replaced with the data you want to add. There are a few built-in commands that are available in all campaigns, but the primary use will probably be to reference your own imported recipient data. For instance, if you have imported something like the following recipient data into Sendcastle:
|                       |                    |                      |
|        email          |      firstname     |       surname        |
|                       |                    |                      |
| hi@example.com        | Peter              | Andersson            |
| hello@example.com     | John               | De Jong              |
| fnurt@example.com     | Joe                | Andersson            |
|                       |                    |                      |
You can address the three fields above by using {$email} to show the email address of the recipient. And likewise {$firstname} and {$surname} for the name of the recipient.

The amount of fields are not limited. But please see to it that the names of the fields contain only numbers (0-9), letters (a-z) or underscore (_), or strange things might happen.

Important to note: Dynamic commands used in the template must ALWAYS be available to the template or you will not be able to open it in the WYSIWYG editor. If you need to use commands that are not always available, place them in an {editable} section (see below for more on that).

As mentioned previously, there are some built-in commands and at the time of writing they are:

Typically always "sendcastle.com", this is mostly used for internal purposes.

This is the name of the domain that the links in your mails will point to (including the links to unsubscribing and viewing online).

The from address you are using for this mail.

The current year, e.g. 2014.

Your company name.

The subject of the current mail.

Your physical address.

A unique identifier for this very batch.

The address to your Facebook profile. Fill this in in your sender domain settings before using it.

The address to your Twitter feed. Fill this in in your sender domain settings before using it.

This is a legacy property and will likely be renamed. This is the address of the recipient. In previews this will appear as "recipient@example.com".

If you are missing some kind of functionality, please let us know!


Creating your own templates

A template is normal HTML, but beware of the limited set of tags you can reliably use in e-mails due to the vast number of different email clients and their own quirks and limitations. There are plenty of resources on the net for finding out about these things. But, for your convenience we provide a number of templates already made that you can simply modify.

Now, should you want to create your very own template anyway, there are a few things you may want to know.

You can include CSS in the HEAD tag, we will respect that and attempt to move it in-line when you send out your campaign. In fact, leaving the CSS in your HTML is definitely the preferred way as it makes it easier for you to tweak any coloring and content. TITLE tag will also remain intact.

Anything else within the HEAD will be ignored and discarded. Any attributes applied to the BODY tag will also be discarded.

At the footer of your mail we will add unsubscribe and view online links, these can be changed, but please, please, please, always have them in your mail so that you do not get reported as spam by recipients who simply want to unsubscribe from your list.

The final template will (or should) be XHTML 1.0 Transitional, and UTF-8 encoded.

To make an area editable in your template add the following around the content that should be editable:

    {editable name="main"}This is the editable content{/editable}

Please note: that the name needs to be unique in the template and should only contain alphanumerical characters (space in the name is not allowed).

The attribute 'name' of 'editable' should be unique within the template and can contain any characters (but not space). We recommend that you name it something that is easily understood and recognized by anyone using the template.
Let's take a look at a simple example, given the following HTML before any modification:
        <title>We are welcoming beta testers</title>
            Hello Joe!
            This is the main content of this mail.

You will now want to make parts of it editable and also have the subject dynamic so that you can re-use the template for later mailings. Oh, let's also be personal, use the recipients first name in the editable part of the headline.

Please note! In order to keep maximum flexibility we actually do not allow "data substitutions" (things that come from your database) in the actual template. The primary reason is that one would not want a template to make any assumptions on the data. So when you want to use substitution commands like e.g. {$firstname}, put them in an {editable}!

Based on the HTML above, your final template would look something like this:
            {editable name="headline"}Hello {$firstname}{/editable}

        {editable name="maintext"}
            This is the main content of this mail.
Note that {$firstname} would have to be available in your data for the personalization to work.

Please don't nest {editable}'s :-)