Development and coding of transactional email templates (MJML)

An email breaks in one mail client and falls apart in another — yet it goes out to the customer the moment they pay or sign up. We build transactional email templates turnkey: component-based assembly, testing across mail clients, source files and guidelines on delivery. Editing a single block instead of rebuilding the entire email cuts revision time many times over.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Frequently Asked Questions

Email Template Development: Where Layout Falls Apart in Email Clients

Transactional emails are read in the moment: a payment receipt, access recovery, order confirmation. How such an email opens determines whether the person returns to the product or goes looking for a feedback form.

Email layout here is not about beauty — it is about the same email rendering consistently in clients that have no agreement with one another.

The main failure points are known in advance. Some email clients render an email with a text editor engine rather than a browser engine: floated blocks collapse into a single column, spacing is calculated differently, and buttons lose their clickable area.

Email template development without a table-based foundation and without accounting for these differences produces emails that look like a design mockup in one client and like broken text in another.

Clipping fails separately: the client collapses a long email in the middle, and the confirmation link remains outside the visible area.

Email dark mode is its own class of failures. The email client inverts colors automatically, and a logo on a transparent background turns into an invisible blot, while light text on a light panel becomes unreadable.

This is fixed not by choosing a “universal” color, but by explicit values for each semantic block in both schemes.

Spam filters look at the markup, not the meaning: tables nested deeply inside each other, an image instead of text, no plain-text version, links to third-party domains with no connection to the sender. The email goes to a folder the recipient does not check, and the entire notification chain breaks.

We build templates in MJML — a declarative language that expands the structure into compatible markup itself — and run the result through real clients, including dark mode. We break down how this is addressed at each stage.

What Component-Based Email Assembly at Scale Delivers

Component-based email assembly is when an email is assembled from ready-made blocks: header, product card, button, footer with unsubscribe.

Reusing blocks removes the main cause of manual edits: the layout is not written anew for each email; instead, a proven fragment is inserted with spacing and behavior in email clients already configured.

Template release speed changes noticeably: an email built from ready-made blocks comes together in hours instead of days, because the stage of debugging appearance across different email programs disappears.

A consistent email style is maintained not by the layout designer’s discipline but by the blocks themselves — spacing, font sizes, and colors are set once in a shared design theme.

The reduction in manual edits is measurable: replacing a sentence, changing block order, updating a promo banner — these are things a marketer does themselves without waiting for development.

The share of requests resolved without a layout designer becomes predominant at scale, and the queue of small tasks stops piling up.

A whole class of defects is addressed separately. Shared blocks are built according to rules understood by the web version, desktop clients, and mobile email clients, and every build is previewed in a list of programs. A “shifted” button or a broken footer does not come back in every new email.

The number of clients where the email has already been checked also becomes manageable: the template is tested on one email campaign stream, then rolled out without repeated debugging.

The result is a predictable release time for a new email and consistent quality across the entire volume.

Template Assembly Methods: Markup, Hand-Coding, Builder

The choice of email assembly method determines how quickly a new campaign goes out and how predictably it renders for the recipient.

The key trade-off is between editing speed and control over markup: email responsiveness and compatibility with older email clients come at different costs.

Below are the options actually chosen between in email template development, with their limitations. In practice, a hybrid approach more often wins: the framework is assembled from ready-made components, while non-standard blocks are hand-coded selectively.

Option When It Fits Limitations
Hand-coding, table-based email layout Non-standard layout, full control over rendering in older clients is needed Every campaign is coded from scratch, edits are slow, responsiveness is easy to break
MJML markup Responsive emails for all clients from a single source are needed A build stage appears, and some fine-grained decisions have to be added manually
Component-based templating engine Many regular campaigns with repeating blocks Requires discipline in component structure, otherwise templates diverge
Visual email builder Edits by marketing without developer involvement Limited grid; complex layouts and precise responsiveness are unattainable
Plain-text templates without markup Transactional emails where deliverability matters No styling or branding; some scenarios cannot be covered
Hybrid approach Component-based framework, one-off blocks are hand-coded selectively Harder to maintain a consistent style; requires editing rules

Implementation Process: From Email Audit to Project Handover

Transactional emails are sent by trigger, not on a schedule: invoice, access recovery, order confirmation. An error in such a template breaks the scenario entirely, so we fix the work sequence before building the first line of markup. Below are the six stages we go through on every project.

  1. Audit of existing emails. We collect all triggers and analyze the current layout: nested tables, inline styles, dark mode, preheader. The output is a template map and a list of issues that break rendering.
  2. Email block schema. We break down each template into reusable blocks: header, body, CTA button, footer with legal information. An edit in one block does not affect neighboring sections.
  3. Assembly and layout. We assemble blocks into a single inherited structure, immediately maintaining the plain-text version of the email and responsiveness for narrow screens.
  4. Email client testing. We render the template in desktop and mobile clients, in dark mode, and with images disabled — discrepancies show up exactly there.
  5. Test send. We run it on live addresses through a real service: variable substitution, links, subject line, web version appearance, and inbox placement.
  6. Template handover. We deliver the repository, block documentation, and guidelines: how to add a new trigger and test it without affecting other emails.

What You Receive: Sources, Schemas, Guidelines

Handover is not an archive of layout code, but a working kit with which your team manages emails further on its own. Templates are assembled from a shared block library, so a new campaign is a matter of copying a block and editing text, not coding from scratch. Here is what is delivered with the project.

  • Email template source files — modular MJML markup from which all transactional scenarios are built: order confirmation, password reset, receipt, shipping notification.
  • Block library — header, button, product card, order table, footnote. The set covers typical emails, so a new campaign is assembled from ready-made parts rather than coded anew.
  • Inheritance schemas — which template depends on which and where colors, logo, and signatures change: an edit in one place propagates to all emails.
  • Editing guidelines — what can be changed immediately and what requires rebuilding and running against reference snapshots. The rules are documented, not held in one engineer’s head.
  • Reference rendering snapshots — control snapshots of each email in email clients: after an edit there is something to compare against, and regressions are visible before sending.
  • Email documentation — trigger list, substitution variables, image hosting requirements, and publishing procedure, plus a team guide: a new developer gets up to speed on the project in a day.

Case Study: How We Eliminated Discrepancies Between Email Clients

The client is a service with transactional emails in four languages: order confirmation, password reset, delivery status change.

The layout lived in four separate files that gradually diverged: a button or footer edit was made manually in each, and some changes were lost along the way.

The same scenario in the Russian and English versions differed in spacing, button widths, and block order — support turned into constant comparison of copies.

We assembled a single block library: header, footer, button, order table, tracking, legal block. Template markup is assembled from these blocks, and texts are moved into separate dictionaries per language.

Assembly comes from a single source via MJML — table-based layout and inline styles that email clients understand are generated automatically.

Before and After Metrics

Previously, releasing a new email took 2–3 days: comparing four versions, manual edits, checks. Now it takes 3–4 hours, including test sends to major email clients.

The number of rendering defects that surfaced with live users dropped from 5–7 per release to zero-one: responsiveness and alignment are built into the blocks rather than written anew in every campaign.

Adding a fifth locale now comes down to a new dictionary and running checks — the layout does not need to be touched. Updating the brand style is an edit in one block that rolls out to all emails on the next build, with no risk of an old button remaining somewhere.

How a Transactional Email Differs from a Bulk Campaign

A transactional email is triggered by an event: payment completed, order status changed, access recovery requested. One recipient — one email for a specific reason, and it must go out within seconds after the event.

A bulk campaign works differently: one piece of content goes to a database segment on a schedule, and a one-minute delay breaks nothing.

This is where recipient data substitution requirements diverge.

In a transactional template, fields come from the event — order number, contents, a personal link with a one-time token — and with an incomplete set, it is better not to send the email at all than to show an empty line or someone else’s data.

In a bulk campaign, substitutions are shared across the segment: name, city, discount — and an error costs reputation but does not break the scenario.

Assembly is different too. A transactional template is a set of components with conditional blocks: delivery, return, order items, language versions. A bulk email is closer to magazine layout: identical sections, mandatory unsubscribe, a unified visual framework. We build both types with component-based MJML markup — email clients still cut flexible styles.

The biggest difference is load. Event-based sending creates spikes: a sale or payment failure raises the flow several times over within minutes.

That is why transactions are moved to a separate queue with priority over bulk campaigns, an idempotency key is added against duplicates, retries are configured for email gateway failures, and undelivered messages are quarantined. Bulk campaigns are planned in advance and spread out over time.

Common Technical Questions About Email Layout

Concerns at acceptance repeat: email behavior in different clients, dark mode, migration from a builder. Our testing is a fixed set of scenarios, not “we looked and it seemed fine.”

Pre-send testing — what does it include?

A scenario matrix: desktop and mobile Outlook, Gmail on web and in the app, Apple Mail, viewing with images disabled. For each — a screenshot and a note on what reflowed: columns, system font, alt text.

How do we migrate from a builder?

We capture the structure of the current email, reproduce the blocks with component-based markup, and compare side by side with the original. The unsubscribe link, analytics pixel, and substitution variables keep their previous names, so segments remain in place.

Dark mode and large font?

Clients invert colors themselves, so we set the background and text color explicitly at every level and provide the logo in two variants.

With an increased font size, the layout switches to a single column without horizontal scrolling, and the button retains a large tap area; email accessibility — alt texts and contrast — is checked in the same matrix.

How are edits made after handover?

Edits go through the component source, not through manual editing of the built HTML — otherwise the next campaign will diverge from the current one. Replacing text or a link is an edit in one place and a rebuild; changing a block’s structure is agreed separately.

Let’s Discuss Your Task and Come Back with an Estimate and Plan

So the estimate is not a “rough guess,” a few inputs are enough at the start. Below is what to send when discussing the task: it is enough to build MJML templates, run them in real email clients, and come back with a work plan and implementation timeline.

  • 5–7 email samples — password reset, order confirmation, receipt, notification. Better with real data: you can see the length of names, values, and product names.
  • List of clients for testing: Outlook on desktop and web, Gmail, Apple Mail, mobile apps, corporate filters.
  • Languages and locales: which versions are needed, text direction, who provides translations, and how variables are substituted into the email.
  • Dark mode requirements: whether the background is forcibly inverted, whether there are logos with transparency, which colors are allowed.
  • Integration points with the sending service: variables, unsubscribe and view-in-browser links, delivery notifications.
  • Access: test domain, sending service account, location of current templates.
  • Brand book: colors, fonts, vector logos, email width constraints.

Some items on the list may be missing — tell us directly, and we will collect part of the data together on a call. Then we provide an estimate and work plan: breakdown by templates, rollout order, implementation timeline, and project start point.

Our competencies:

Latest works

  • B2B ADVANCE company website development
    B2B ADVANCE company website development
    1542
  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1394
  • Website development for BELFINGROUP
    Website development for BELFINGROUP
    1081
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1369
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1142
  • Website development for FIXPER company
    Website development for FIXPER company
    1060