Designing The Perfect Transactional Email: Going Above And Beyond With Templating


We all agree that email is an amazing channel to engage with our users (if not, start reading this). It’s a space where people get work done, communicate with their personal network and let brands in as well. On top of that, transactional emails drive four to eight times more opens and clicks than marketing email. Transactional email are automated messages that are sent to a user after they’ve taken a predefined action, often to complete or summarize an operation. This includes password resets, shipping confirmation and receipt. Consumers are more likely to engage with this content because it’s information they’re expecting.

In addition to it being important to timely land in the customer’s inbox, we also know that they’re looking for highly personalized content that’ll make the information feel more relevant, valuable and even more credible at times. Imagine receiving a bank statement with “Hello customer”. Now imagine one that starts with a personalized “Hello {{first_name}}”. You probably feel like the latter is more credible right?

Making email more personal is already a big improvement versus generic email. Yet, we can do way better and go way beyond that.

Today, to make this easier for our users, we’re proud to announce that our Send API for Transactional will support templating markup. Leveraging a syntax inspired by the most popular templating languages, like Jinja2 or Twig, so it’s familiar to you already, it allows our users to delegate all the processing of the messages so that you can just focus all your energy on designing great templates that your own contacts will love.

For something with such great value add, it can be frustrating (especially for us developers) how challenging and time consuming it is to build the system pieces needed to achieve that, while not being a core value of your business activity.

Recommended for YouWebcast: Sales and Marketing Alignment: 7 Steps To Implement Effective Sales Enablement

Let’s dive deeper into it – starting with a simple example. Since the release of episode VII of Star Wars is happening very soon, let’s use it to contextualize the following example.

We would like to send a different email layout to the good side of the email force, and another one, to the dark side. We store in our backend the side of the force a given contact is on. Knowing that, we can define the following HTML, including Mailjet Template Language conditions on the contact status:

We can also add conditions on the email subject:

This example is quite short and intentionally limited, yet it features the value of adding templating logic in email. Without such a feature, you would have had to define two templates, one for the Jedis and another one for the email dark side. Twice the maintenance effort, many repetitions: it would not have scaled nicely.

Obviously, there are many more – and useful – things to achieve with it, such as including or removing entire sections of the email depending on your contact’s profile, easily including a list of items (loop structure) and many other things we can’t wait to see you implementing from your side.

The Mailjet Template Language for transactional is fully integrated with our Transactional Send API, meaning it accepts both a template or an HTML/Text part containing some templating markup.

Putting everything together, this email can be sent by issuing the following API call with curl:

All this put together would result in an email with the subject “Hello email Jedi!” and with a text/HTML body “Dear Jedi, welcome to Mailjet! May with you, the delivery force be” for [email protected] (because obviously, Mailjet Passenger is an email Jedi!) and another one with subject “Do you have a dark side?” and text/HTML body “Powerful you have become, the dark side I sense in you.” for let’s say [email protected].

As always, the same flow can be achieved via SMTP via two new SMTP custom headers we’ll introduce.

The Mailjet Crew has been geeking over this templating feature for quite some time now and we’re super excited that we’re finally able to share it with you. We hope you’re just as pumped as us about the first step of our transactional toolkit. The feature is now available in private beta from today onwards. Reach out to us at [email protected] to be granted access. Don’t worry if you don’t get around to beta testing though, we’ll be releasing it to the public by the end of the year.

Stay tuned – more exciting product releases (like this one) are coming soon!

Digital & Social Articles on Business 2 Community


Tech companies seem to be scammier and scummier than ever. What’s going on?


“I Did Every Horrible Thing In The Book Just To Get Revenues” – Mark Pincus (2009)

I dream of scambox zero. That is, I long for the day when my email inbox doesn’t contain a single tip about a tech company – large or small – attempting to trick you with some deceptive, and usually illegal, money- or user- grabbing ploy.

As things stand currently, for every Tellspec, or Breeze, or Crowdfunder, there are a half dozen others vying for Pando’s investigative attentions. When readers ask “why don’t you write about this scampaign?” Or “have you looked into the background of this startup?” the answer is usually “because there aren’t enough hours in the day” and “not yet, but I promise I will.”

And still they keep coming – in larger numbers that I can ever remember.

So what does this explosion in low-level deception mean? And what are we to make of the attendant rise in generally shitty startup behavior: ClearSlide’s 10 hour day, Indiegogo’s refusal to clamp down on fraud on its platform, Zirtual’s mass layoffs and its investor’s bullshit public solicitation for new money after bad?   

Ego wants me to believe that the increase in story tips is connected to the fact that Pando is pretty much the only independent voice left in the tech blog world. Everyone else is owned by Verizon or Comcast or Monsanto or IG Farben or whoever the hell, leaving Pando the only place free to cover wrongdoing in the industry. There’s probably something in that – and I’d be remiss if I didn’t thank Pando subscribers and Patrons for keeping us in business, and independently so – but the fact that the Wall Street Journal broke the Theranos scandal, and even recently followed up our 2012 story about VC scouts, shows it isn’t quite so clear cut.

A more likely explanation – and one backed up by others I’ve spoken to who live and work in the tech industry – is that there are just more scams to go around. That, in recent months, companies have just become more willing to behave in shady ways. That investors and executives are more willing to let that behavior slide, if it results in more revenue and more users. And that, thanks to the cult of the founder, there’s less board oversight than ever before to stop shady schemes before they even start. Fortunately, there also seem to be more employees – or former employees – willing to blow the whistle.

But why now? That old Mark Pincus at the top of the page offers a possible clue. It was first reported by Michael Arrington on TechCrunch back in 2009. According to Arrington, Pincus explained that he was willing to do any “horrible” thing to make his startups profitable because he wanted to retain control. “ I knew that I wanted to control my destiny, so I knew I needed revenues, right, fucking, now. Like I needed revenues now.”

Flash forward to the present day, and there are a lot of people worried about keeping control of their startups. We know there’s a “correction” or a “downturn” or a “clusterfuck” coming in the tech industry. Commentators smarter than me can point to all kinds of clever venture capital-y or Wall Street-y signs of the impending implosion. Others say they know there’s a bubble when we see an increase in companies that exist only to do low margin shit-work like parking your car, or doing your laundry.

I know something is bad coming because of the scams. The fact that so many stakeholders are willing to risk being exposed, and even sent to jail, for just a few extra bucks or a couple of hundred sign ups tell me that they know this is make or break time for a lot of shitty companies. Either they’ll be out of business in six months, in which case their bad behavior will be forgotten, or they’ll survive long enough to apologize and make things right. To stand a chance of survival they – as Pincus put it – “need revenues, right, fucking, now.”

A growing number of disgruntled employees willing to dish to Pando, and other reporters, about an increasing number of scams is a warning, just as clear as the rippling water in Jurassic Park warned Jeff Goldblum and Sam Neill about a coming T-Rex.

Something ugly is close, and getting closer.

SPONSOR MESSAGE: We handle the payments. You handle everything else. Learn more about Braintree.

Pando latest articles