Why Migma Built Zinn: A Language for HTML Email

AI writes great emails but breaks them in Outlook and dark mode. See how Migma's Zinn compiler builds inbox-safe HTML every time, and test it yourself.

Written by

Jessica Oura

Published

Last updated

Why Migma Built Zinn: A Language for HTML Email
Quick Summary:
> AI writes a great email in seconds, then the code breaks in Outlook, Gmail, or dark mode. The problem is not the model. It is asking one model to handle both the design and years of inbox quirks. Zinn splits that job: AI describes what the email should be, and a compiler writes the inbox-safe HTML every time. Keep reading to see how it works, what it cannot promise, and how to test it yourself in 20 minutes.

Zinn is Migma's email language and compiler. It separates what an email should be from how each inbox needs it written. AI and the Visual Editor describe the email in simple building blocks, and the compiler turns that description into production HTML that is built for Outlook, Gmail, Apple Mail, mobile, and dark mode.

We built it because email looks like a web page, but it is not one. A layout that works in Chrome can lose its spacing in classic Outlook for Windows. A button can change shape after someone forwards the email. Gmail supports only part of CSS and quietly ignores the rest. Dark mode can recolor a brand palette without asking.

AI made this old problem easier to see, not easier to solve. A model can write a great headline and a clean layout in seconds, but that does not make the code safe for every inbox. This article explains why we drew the line where we did, how Zinn works, what it changes for AI agents, and how to test the result yourself.

TL;DR

QuestionShort answer
What is Zinn?Migma's email language and compiler layer.
What problem does it solve?Design intent breaking when it becomes inbox code.
Who writes the inbox code?The compiler, not the AI model and not you.
Does it guarantee identical rendering?No. It makes construction predictable, then Preflight checks the result.
How do I check it?Run Email Preflight, send a test, and review the real inboxes.

What Is Zinn?

Zinn is a small, email-native language that sits between how you create an email and the HTML that gets sent. It describes sections, columns, images, text, buttons, spacing, brand styles, and responsive behavior. It does not describe arbitrary web pages.

A compiler then reads that description and writes the final code. That code includes table layouts, inline styles, Outlook fallbacks, responsive rules, and dark mode metadata. You never have to see it unless you want to.

This split is the whole idea. The AI model focuses on the message and the design. A deterministic compiler handles the client-specific code. Deterministic means the same input always produces the same output, which is exactly what you want from the part of the system that touches the inbox.

There are four common ways to get from an idea to email HTML. Each one puts the hard work in a different place.

ApproachWho writes the inbox codeMain risk
Hand-coded HTMLA developer, line by line.Slow, and every fix depends on one person's knowledge.
AI writes raw HTMLThe model, in one pass.Code looks valid but breaks in Outlook or dark mode.
Drag-and-drop templatesThe template author, once.Safe, but rigid when the design needs to change.
Zinn language and compilerThe compiler, every time.Clients can still block images or swap fonts, so testing stays.

Zinn is how Migma keeps the speed of AI generation without giving up the safety of tested templates. If you are comparing tools in this space, our roundup of the best AI email builders explains where this approach fits.

Why Email HTML Still Has No Single Browser

Modern web development has one common target. Browsers follow shared standards, so a page built today works in Chrome, Safari, and Firefox with few surprises. Email has many targets, and each one follows its own rules.

Microsoft documents that classic Outlook for Windows uses Word's HTML engine to display email. That affects ordinary techniques like margins, padding, line height, background images, and rounded buttons. Some layouts need table cells or Outlook-only VML code to show up at all.

Gmail publishes its own list of supported CSS properties and media queries. Anything outside that list may be ignored. Other clients add their own behavior for fonts, image blocking, dark mode, and mobile layouts.

ClientWhat often breaksWhy it happens
Classic Outlook for WindowsPadding, margins, background images, rounded buttons.Word's HTML engine, not a browser, paints the email.
Gmail (web and app)Some CSS selectors and properties.Gmail supports a defined subset of CSS and strips the rest.
Apple MailCustom fonts and dark mode colors.Strong CSS support, but its own dark mode handling.
Mobile appsColumn stacking and tap target sizes.Small screens and varied media query support.
Dark mode (many clients)Logos, brand colors, and text contrast.Clients invert or adjust colors in different ways.

This fragmentation creates a workflow that looks fine right up until it fails:

  • The design looks correct in the browser preview.
  • The generated HTML passes a validator.
  • The same email reaches several different inbox engines.
  • Each engine reads part of the code in its own way.
  • The team finds the breakage during QA, or after the send.

Microsoft's own guidance describes processing HTML to work around client limits, and it still tells teams to test custom code across email clients. The problem is not one missing CSS trick. It is an unstable translation between what the designer meant and what each inbox does. Our guide on fixing broken emails in Outlook, Gmail, and dark mode walks through the most common symptoms.

Why Asking AI for Final HTML Was the Wrong Boundary

An AI model can write HTML. That does not mean final HTML should be the surface it designs on.

When one prompt has to produce the final email code, the model is doing many jobs at once:

  • Understanding the campaign goal.
  • Writing the copy.
  • Choosing a visual hierarchy.
  • Applying brand rules.
  • Building a responsive layout.
  • Remembering Outlook exceptions.
  • Inlining CSS where inboxes need it.
  • Keeping personalization variables intact for the sending platform.
  • Avoiding feature combinations that some clients do not support.

Those goals compete for attention. More client-specific code also means more places for an edit to go wrong. A small change to one section can disturb code that has nothing to do with the visible request. We looked at this pattern in detail in why Claude and ChatGPT fail at email marketing.

One small edit, two ways

Here is what happens when a marketer asks to make one button wider on mobile.

StepAI edits raw HTMLMigma with Zinn
1. The requestModel rewrites a block of table code.The button's width value changes in Zinn.
2. The side effectOutlook VML fallback is missed or rewritten.Nothing else in the source changes.
3. The buildWhatever the model wrote is the final code.The compiler rebuilds all client fallbacks.
4. The checkSomeone has to spot the Outlook break.Preflight checks the new build before export.

We wanted a cleaner boundary. AI should express email intent in a constrained form. The compiler should own the mechanical compatibility work. That became Zinn.

How We Designed Zinn: Five Principles

We did not start by inventing syntax. We started with failures we had seen in real emails and asked what the system would need to stop them.

1. Start from inbox behavior

The first question was never "What syntax looks elegant?" It was "What must always be true when this email leaves Migma?"

RequirementWhy it matters
Stable table-based layoutSome clients cannot handle browser-style layout.
Inline styles where neededMany inboxes ignore or strip styles in the head.
Responsive rules with safe fallbacksMobile layouts must degrade gracefully.
Outlook-specific structuresWord cannot paint some features like a browser.
Useful output without images or fontsImages get blocked and custom fonts fail to load.
Readable brand colors in dark modeClients recolor content in different ways.
Personalization variables preservedMerge tags must survive export to your ESP.

The language exists to capture the intent behind those requirements. The compiler exists to enforce them on every build.

2. Keep the vocabulary email-native

Zinn describes email building blocks, not web pages. It covers content hierarchy, images, buttons, columns, spacing, backgrounds, variables, and reusable brand choices.

The smaller vocabulary is deliberate. Fewer valid shapes make the output easier to validate, edit, and compile. It also gives AI agents a clearer target than the thousands of possible HTML and CSS combinations they would otherwise choose from.

3. Let the compiler own the ugly code

Production email HTML is long because it carries years of client workarounds. That complexity still has to exist. It just should not be rewritten by a marketer, a designer, or a model every time.

With Zinn, the compiler generates the tables, inline styles, conditional code, responsive rules, and fallbacks from one editable source. The same source feeds the preview, Preflight, export, and send.

4. Send every creation path through the same system

Migma can start an email from a prompt, a Figma frame, a screenshot, an HTML file, a previous email, or a reference design. These inputs look very different, but they should not create different rendering standards.

Starting pointWhat Migma does with itRelated reading
PromptBuilds the design as Zinn, then compiles it.MigmaAI product overview
Figma frameConverts the frame into editable Zinn blocks.Convert Figma to HTML email
Screenshot or referenceRecreates the layout as structured blocks.Migma for designers
Imported HTMLTurns it into an editable email, not a frozen blob.Migma for developers
Visual editsChanges the Zinn source, then recompiles.How to edit any email visually

Imported HTML does not stay a fragile foreign file. An AI design does not get a special browser-only path. Visual edits do not skip the compatibility layer. Every path meets the same engine, which is why a fix made once helps every email. If your team designs in Figma first, see how Figma and Migma connect.

5. Treat validation as a separate step

Compiling reduces risk. It does not remove the need to review.

Email Preflight checks client previews and flags compatibility, link, content, and deliverability issues before export or send. You can fix what it finds, run it again, and then send a controlled test.

The difference is simple. The compiler gives you predictable construction. Preflight gives you evidence about the email as it stands right now.

One Source, Several Inbox Targets

Diagram showing an editable email rendered for Outlook, Gmail, Apple Mail, and mobile

Each layer in the Migma workflow owns one job. Just as important, each layer is honest about what it does not own.

LayerOwnsDoes not own
Campaign briefAudience, offer, proof, CTA, and constraints.Client-specific HTML.
AI and Visual EditorCopy, hierarchy, layout intent, and brand.Outlook workarounds.
ZinnEmail structure and validated design intent.Sending reputation.
CompilerTables, inline styles, responsive rules, and fallbacks.Campaign approval.
Preflight and test sendRendering evidence, links, warnings, and review.Guaranteed inbox placement.
Export or sendThe approved email and its destination.Creative strategy.

Keeping these responsibilities separate stops any one tool from pretending it solved everything. It also makes problems easier to trace. If a headline is wrong, that is a brief or copy issue. If padding breaks in Outlook, that is a compiler issue, and fixing it there fixes it for every future email.

Why this became a product decision

Zinn changed what Migma could promise. Without a shared rendering layer, every new input creates another conversion problem. Prompt generation, Figma import, screenshot recreation, HTML import, visual editing, agent actions, and ESP export could each drift into their own separate implementation, with their own bugs.

With one email language and one compiler, those paths meet in the same place. The team improves rendering once, and every email benefits. That foundation shaped Migma's 2026 launch, where the Product Hunt discussion focused on prompt-to-email creation, Email Preflight, and the in-house compiler. Public interest does not prove rendering quality, but it shows the problem is familiar to anyone who has watched a perfect browser preview fall apart in Outlook.

What Zinn Changes for AI Agents

AI works better when the output has clear rules.

Raw email HTML gives a model many ways to express the same visible idea. Some of those ways work in a browser but fail in an inbox. Some render correctly but are hard to edit later. Some keep the design but break personalization, or grow so large that Gmail clips the message.

An email language gives an agent a much stronger contract:

  • Use known email components.
  • Keep the hierarchy explicit.
  • Apply brand values the same way every time.
  • Produce output that can be parsed and validated.
  • Return a clear error when the intent is invalid.
  • Recompile the same source after a targeted edit.
What the agent doesWith raw HTMLWith Zinn
Adds a sectionWrites new tables and styles from scratch.Adds a known block with brand values applied.
Edits one elementRewrites nearby code and risks side effects.Changes one value, then the compiler rebuilds.
Makes a mistakeInvalid code may still look fine in a browser.The compiler returns an error the agent can fix.
Handles OutlookHas to remember VML and conditional comments.Never touches it. The compiler adds it.

This is why Zinn is more than compressed HTML. It is the boundary between probabilistic generation and deterministic rendering. The model can be creative where creativity helps, and the compiler can be strict where strictness protects the send. The same contract makes Migma safer to use through the developer API and for teams that need consistent output at scale on Migma Enterprise.

What Zinn Solves and What It Cannot Promise

Zinn solves the repeatable construction of email-safe code inside Migma. It reduces dependence on hand-written tables, inline styles, Outlook conditions, and one-off fixes for each creation path.

It does not make every inbox display identical pixels. Email clients stay in control of the final display, and some of their choices cannot be overridden.

Zinn handlesClients can still
Table layouts that hold their shape in Outlook.Block images until the reader allows them.
Inline styles where inboxes expect them.Replace custom fonts with a system font.
Responsive rules with safe fallbacks.Recolor content in dark mode.
Outlook-only code for buttons and backgrounds.Rewrite code when a message is forwarded.
Dark mode metadata for brand colors.Ignore CSS they do not support.
Merge tags that survive export.Clip or transform very large messages.

Rendering also cannot guarantee inbox placement. Sender reputation, authentication, consent, list quality, complaint rates, content, and sending infrastructure all affect delivery.

Migma aims for reliable, readable output across major webmail, desktop, and mobile clients. Your final workflow should still include Preflight, a test send, and human approval. Our client compatibility testing post covers the preview side in more detail.

How to Test the Claim Yourself

Do not judge an email compiler from a browser screenshot. Run a small compatibility test instead. It takes about 20 minutes and tells you more than any product page.

  1. Build an email with two columns, a branded button, a background image, a custom font, and a dark section.
  1. Preview the desktop and mobile versions.
  1. Run Email Preflight and note every warning.
  1. Check classic Outlook for Windows, Gmail web, the Gmail app, Apple Mail, and dark mode.
  1. Send a test to the inboxes your audience actually uses.
  1. Record layout changes, fallback fonts, color shifts, and link results.

Use a simple log so the results are easy to compare.

What to checkWhat good looks likeWhat to record if it fails
Two-column layoutColumns sit side by side on desktop and stack on mobile.Which client, and whether columns overlap.
Branded buttonCorrect color, shape, and size in Outlook.Square corners, missing color, or small tap area.
Background imageImage shows, or a solid color fallback appears.Blank area or unreadable text.
Custom fontBrand font loads, or a close system font appears.Fallback font name and any layout shift.
Dark sectionText stays readable and the logo stays visible.Inverted logo or low-contrast text.
Links and merge tagsEvery link works and every variable fills in.Broken link or raw tag showing.

Use the same test for Migma and any alternative you are considering. The evidence should come from the exported email and the real inbox, not from vendor copy, ours included. If you want a second opinion, our comparison of HTML email testing tools lists options, and Can I Email shows which features each client supports.

Final Thoughts

Migma built Zinn because AI made the old email problem more visible, not less important. Models create ideas quickly. Inboxes still demand careful, client-specific code. Asking the same model to improvise both layers produces fragile emails.

Zinn gives Migma a stable middle layer: structured email intent in, production email HTML out. People and agents work on the message and the design, while the compiler handles years of inbox quirks underneath. The old problem remains. A better abstraction makes it manageable.

For your next read, learn how the Visual Editor edits the Zinn source directly, see how Email Preflight checks every build, or get the bigger picture in our MigmaAI product overview.

Ready to see it in your own inbox? Open Migma and create your first email.

CTA of Migma

Frequently Asked Questions

What is Zinn, and what problem was it built to solve?

Zinn is Migma's email language and compiler, built to stop design intent from breaking when it becomes inbox code. AI and the Visual Editor describe the email in simple building blocks, and the compiler turns that description into production HTML for Outlook, Gmail, Apple Mail, mobile, and dark mode.

Why build a new language for email instead of using HTML templates?

Templates are safe but rigid, and raw HTML is flexible but fragile, especially when AI edits it. Zinn gives Migma the flexibility of AI generation with the safety of tested templates, because every email, whether prompted, imported, or edited visually, is compiled through the same rendering engine.

Why is production email code so verbose, with table layouts and inline styles?

Email has no single browser standard, so production code carries years of client workarounds. Classic Outlook renders with Word, Gmail strips unsupported CSS, and many inboxes ignore styles in the head, which is why tables, inline styles, and Outlook-only fallbacks are still needed. Zinn lets the compiler generate all of that so nobody has to write it by hand.

How does an email compiler turn simple email code into production-ready HTML?

The compiler reads a structured description of sections, columns, text, images, buttons, and brand styles, then writes the client-specific code underneath. In Migma, Zinn produces table layouts, inline styles, responsive rules, Outlook fallbacks, and dark mode metadata, and the same input always produces the same output.

How do AI agents benefit from writing in an email language instead of raw HTML?

An email language gives agents a small, clear set of valid components instead of thousands of possible HTML and CSS combinations. With Zinn, an agent changes one value instead of rewriting nearby code, gets a clear error when the intent is invalid, and never has to handle Outlook workarounds because the compiler adds them.

How is Zinn different from MJML and other email frameworks?

MJML is an open-source markup language that developers write by hand and compile to responsive HTML. Zinn is built into Migma as the shared layer behind AI generation, Figma import, HTML import, the Visual Editor, Email Preflight, and export, so every creation path meets the same compiler and the same rendering standard.

Can LLMs reliably write a proprietary email language like Zinn?

Zinn is designed to be easier for AI to write correctly than raw HTML, because its vocabulary is small and email-native. When a model produces invalid intent, the compiler returns an error the agent can fix, so reliability comes from validation on every build rather than from the model remembering inbox rules.

What can an email compiler guarantee, and what can it not?

A compiler guarantees predictable construction, meaning the same source always produces the same inbox-safe code. It cannot force identical pixels, because clients can still block images, swap fonts, recolor dark mode, or clip large messages, and it has no control over inbox placement. That's why Migma pairs Zinn with Email Preflight and a test send.

Can I export plain HTML from Zinn, or will I be locked into one platform?

Zinn compiles to standard production HTML, so the email that leaves Migma works like any other HTML email. You can send directly from Migma or export to ESPs such as Mailchimp, Klaviyo, HubSpot, Brevo, AWS SES, and Resend, with merge tags preserved for your sending platform.

Can developers and other platforms use Zinn through an API?

Yes. Developers can use Migma's developer API to generate and work with emails programmatically, and the same Zinn compiler sits behind every API request. That gives teams building at scale, including those on Migma Enterprise, the same consistent output as emails built in the editor.

The author

From idea to inbox in seconds

Create professional, personalized emails with AI.

Start for free