- For devs
Designing HTML Email Templates For Transactional Emails
Most people prefer to section off transactional and marketing emails from each other, and it’s easy to understand why. When it comes to things like your domain and IP reputation, it’s important to keep your transactional messages separate from your marketing messages.
However, in the growing world of email automation, the lines are starting to blur and data from transactional emails gets lost in translation to marketing. Transactional data should coalesce seamlessly into targeting your marketing audience.
Data collection has become an abundance with the multiplex of media channels potential prospects or customers connect with to interface with a business. Our personal favorite channel (no surprise) is email. Maybe more surprisingly, email tracking for transactional and marketing emails is one of the blind spots that companies still haven’t incorporated. It’s one of the many solutions customers come to Mailgun to solve.
It’s all email, am I right?
But let’s take a step back. Way back in the day (read: a couple of years ago) bulk marketing emails were still cutting it as far as conversions for most businesses.
Today, you can’t send email like you did back in the early 2000s with email bursts left and right. Bulk marketing emails with zero personalization have fewer open rates, clicks, and higher complaints. They’re boring, and nobody is going to click on a boring, blanket marketing push. If you can’t change with the times, you’ll get left behind in the spam folder.
Email automation has come a long way. Nowadays, you can use companies like Customer.io to pull different data metrics to create highly personalized triggered email campaigns.
With more data-driven email solutions than ever before, you can take your data and create a triggered marketing campaign sequence. These sequences create highly personalized content for the recipient, making it more meaningful for them. Better content leads to more engagements, and triggered marketing campaigns are a great way to do that.
To start, it requires a defined plan that is set in motion by behavior and contextual data collected from your customer channels. Email marketing automation services such as Customer.io and Iterable are powerful platforms and enabling designing decision-based or sequenced emails through a CRM.
The easiest way to explain a triggered email campaign, to us at least, is with an example. Let’s take an e-commerce platform (travel booking agency) and the amount of customer email touchpoints and opportunities to have insight into a particular recipient:
Welcome Email
Password Reset Email
Receipt Email
Invoice Email
Shipping Notification Email
With these recipient triggered emails, Mailgun tracks the email each step of the process and provides detailed meta-data for events that occur. Insights from analytics and meta-data ensue a method for customers to structure client base segmentation.
One of the benefits of being a more developer-focused platform is that our email templates feature gives you a lot of room to store and play. One way of doing this, especially in the case of making personalized triggered emails, is by supporting Handlebars v 3.0 and Go-lang as our template engines. With these template engines, we can create a more robust email marketing messages without too much legwork.
Continuing with our travel booking agency example, let's imagine a scenario in which a potential prospect signed-up with an account but has not made a purchase. We recognized from behavioral data they interacted with two particular cities while browsing our websites. With this data, we can create an email that suggests these two cities as popular travel destinations.
Our initial step is to prepare a template to be sent to re-engage with the customer. The example API request will demonstrate storing a simple HTML example including Handlebars expressions with Mailgun’s Templating feature.
1import requests23def send_template_message():4 r = requests.post(5 "https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages",6 auth=("api", api_key),7 data={"from": "Excited User <mailgun@YOUR_DOMAIN_NAME>",8 "to": "yourrecipient@domain.com",9 "subject": "Hello",10 "template": "vacation_template",11 "o:tracking": "yes",12 "h:X-Mailgun-Variables": '{"place": [{ "city": "Tokyo", "url": "https://www.mailgun.com"}, { "city": "San Francisco", "url": "https://www.mailgun.com"}]}'})13 print r.json()14 return1516send_template_message()17
From there, the recipient will receive an email that has those two cities as places they could travel. Pretty cool, right? This is just a simple example, but you can build sophisticated newsletters, re-engagement campaigns, and even welcome emails that are tailored to your recipient.
Personalization at first glance is a daunting task to many senders, but it doesn’t have to be that way. If you take your data and plug and play with Handlebars, your email templates will stand out against blanket email bursts. Better emails make for better engagement, and that keeps you out of the spam folder.
Should you ever run into trouble with our templates and handlebars, feel free to reach out.
Learn about our Deliverability Services
Looking to send a high volume of emails? Our email experts can supercharge your email performance. See how we've helped companies like Lyft, Shopify, Github increase their email delivery rates to an average of 97%.
Last updated on August 28, 2020
Designing HTML Email Templates For Transactional Emails
Tips for Building Better Holiday Email Templates
Different ways to build AMP emails
Responsive Email Templates You Can Get Creative With
Reach Your Users Through Email And Push Notifications On The Same Platform
Sendwithus Turns Mailgun Into A Fully Featured Marketing Platform
Building HTML Email And Workflow Tips
Become an Email Pro With Our Templates API
How to Conduct a Comprehensive Email Deliverability Audit
Dark Mode for Email Survey: What Do Email Senders Think?
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
Become an Email Pro With Our Templates API
Google Postmaster Tools: Understanding Sender Reputation
Navigating Your Career as a Woman in Tech
Implementing Dmarc – A Step-by-Step Guide
Email Bounces: What To Do About Them
Announcing InboxReady: The deliverability suite you need to hit the inbox
Black History Month in Tech: 7 Visionaries Who Shaped The Future
How To Create a Successful Triggered Email Program
Designing HTML Email Templates For Transactional Emails
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
Implementing Dmarc – A Step-by-Step Guide
Announcing InboxReady: The deliverability suite you need to hit the inbox
Designing HTML Email Templates For Transactional Emails
Email Security Best Practices: How To Keep Your Email Program Safe
Mailgun’s Active Defense Against Log4j
Email Blasts: The Dos And Many Don’ts Of Mass Email Sending
Email's Best of 2021
5 Ideas For Better Developer-Designer Collaboration
Mailgun Joins Sinch: The Future of Customer Communications Is Here
Always be in the know and grab free email resources!
By sending this form, I agree that Mailgun may contact me and process my data in accordance with its Privacy Policy.