We know there’s a lot to delivering beautiful, actionable, emails to every inbox. Here are just a few things that pop up when creating transactional emails:

Writing copy that is clear and engaging.

Inlining CSS styles so that content renders correctly in more email clients.

Iterating on email designs before and after deployment of your software.

Sending test emails to make sure everything is pixel perfect.

Making your email “dynamic” so that it can be sent with details specific to a particular recipient.

Postmark Templates provides the tools you need to address these challenges and will have you creating awesome emails in no time.

Let’s take a peek:

To start using Postmark Templates, navigate into one of your Servers, and then click on “Templates.” One of our designers, Derek Rushforth, has put together some rock-solid starter templates. These templates don’t just look great (including on Mobile!), they also take into account all of the lessons we’ve learned from our research on what makes a great transactional email.

Once you’ve selected a template, or decided to code your own (try it, it’s fun!), we head into our editing environment.

We start with our Preview feature that will render the content of your HTML and Text bodies using the same process that would occur if you sent an email using this template from our API (applying dynamic values, then inlining styles).

At this point, you may be wondering, how can we show a fully rendered email if you haven’t supplied us with the content for each variable in the template? Postmark Templates includes a powerful feature that can suggest a model for all of the values required by the template. (Don’t worry if this doesn’t make sense yet, keep reading!)

To show this, let’s put the editor in full screen mode, and click “Edit test variables”:

Notice how clean the markup is? We take care of inlining the style blocks (collapsed in the screenshot above), so that updating the structure of your HTML doesn’t require another manual trip through a CSS inliner!

This just scratches the surface of all the little things we’ve done to make authoring email templates fast and easy.

Let’s talk a little more about what you can do once you’ve created your first email template.

We know that in most cases the content of your transactional emails is largely the same. “Forgot password” emails often vary in the link that’s included, and the user’s name, but are exactly the same in every other way. We think sending this sort of email should be as simple as:

You POST a request to our REST API, which includes a TemplateModel, TemplateId, recipient, and sender.

We lookup the Template associated with the submitted TemplateID, combine the Text, HTML, and Subject content of the Template with the TemplateModel submitted through the in the POST request to create the rendered email content. Note: We do CSS Inlining after we’ve applied the TemplateModel, which means selectors like “:nth-child()” apply correctly when we merge arrays of values.

We send the rendered email to the recipient specified in the send request.

To work with templates, we’ve opened up all of the normal endpoints you’d expect:

If you’re using our official libraries for node.js, PHP, .net, or Ruby, we’ve added Template API support in those clients, so you’ll be able to adopt the templating features in no time. You should also check out our documentation on these endpoints, and then come back here, because we have more to show you!

We’ve built a very capable, fast, and safe, templating language that has its roots with another template language you’ve probably seen: “Mustache.” Since our version is a spiritual descendent of Mustache, but maybe a bit more flavorful, we thought we’d call it “Mustachio."

"Mustache” + “Pistachio” = “Mustachio”, get it?

If you’re not already familiar with Mustache, including dynamic content in your templates is as easy as:

Hello, {{recipient_name}}!

Seriously, you’ve got the basics of the templating language. Mustachio is different from “standard” Mustache in three ways:

1. 'Each’ syntax is added, and is recommended for handling arrays of values in your models:

{{#each people}} {{ name }} {{/each}}

2. Complex keys are supported, for example:

{{ this.is.a.valid.key }} and {{ ../this.goes.up.one.level }}

3. Template 'partials’ and ‘lambdas’ are not supported.

Of course, you can see more examples of Mustachio syntax, and get more information on why we differ from “standard” Mustache in Mustachio’s Wiki Pages. We’ll follow up in a future post about why we built Mustachio.

We think that access to these tools and content are valuable to the entire community. That’s why we’re happy to announce that we’re making the following projects Open Source: