VERTO Email Engineering

Email Engineering · Case 01

Mid-Season Sale

A promotional email, hand-coded to render the same in Outlook's Word engine, in dark mode, and with images switched off. The visuals are deliberately restrained — the work is in the code.

600px hybrid/fluid Outlook VML dark mode images-off fallback no JS · hand-coded

The brief

A render problem, not a design problem

VERTO is a fictional e-commerce brand built for portfolio use. The task was a 600px responsive promo that holds up in the clients that break most templates — not a design showcase, an engineering one. Every technique below is hand-written HTML and CSS: no email builder, no MJML compilation step.

Engineering

What broke, why, and the fix

Email clients are not browsers. Outlook on Windows renders through Microsoft Word; Apple and Gmail repaint colors in dark mode; a meaningful share of opens happen with images off. Each item below is a real failure that had to be diagnosed before it could be fixed.

Outlook · Windows (Word engine)

Hero gradient that wouldn’t cover the block

Problem

The hero is a multi-stop gradient. Word ignores CSS gradients entirely, so Outlook needs a VML fallback.

Why it breaks

A two-stop VML gradient bands visibly. And the inner padding cell carried a background-color, which Outlook paints over the VML fill — leaving only a thin sliver of gradient at the bottom edge.

The fix

Switch the VML fill from a gradient to a hosted image, keep color as the images-off fallback, drop the inner cell’s bg-color, and hide the wrapping <div> from Outlook so the content table sits directly inside the textbox and inherits an honest 600px width.

<!--[if mso]>
<v:rect fill="true" stroke="false" style="width:600px;height:360px;">
  <v:fill type="frame"
          src="https://pj-web.github.io/verto/assets/hero-gradient.jpg"
          color="#3a1c71" />  <!-- color = images-off fallback -->
  <v:textbox inset="0,0,0,0">
<![endif]-->
/* inner td.hero-pad: keep background-image (Gmail), remove background-color */
Outlook · Windows (Word engine)

A bulletproof button that stays the right size

Problem

The CTA has to be tappable, centered, and correctly sized without relying on a background image.

Why it breaks

height + line-height drops the label to the bottom of the line-box in Word. And width / display / line-height on the <a> are ignored, so the cell collapses to the width of the text.

The fix

Size the button with mso-padding-alt on the <td> (equal top and bottom), make the <a> an inline-block with matching padding, and set border-radius on both. Trade-off accepted: square corners in Outlook — legible and in place beats fragile rounding.

<td style="mso-padding-alt:15px 44px; border-radius:26px;
           background-color:#ffffff;">
  <a href="#" style="display:inline-block; padding:15px 44px;
     border-radius:26px; font-weight:700; color:#13151a;">Shop the sale</a>
</td>
Apple Mail · dark mode

The button surviving the dark-mode repaint

Problem

The button’s background and rounded shape both have to survive the client recoloring the message in dark mode.

Why it breaks

When the client fills the <a>’s background in dark mode, a missing border-radius on the <a> leaves a white square sitting on top of the rounded <td>. Separately, Apple clamps pure #ffffff to a darker tone in dark mode.

The fix

Put border-radius on the <a> as well as the <td>; hold the button background on the <td> (Apple repaints td-backgrounds more predictably than inline <a> backgrounds); and use off-white #fffffe instead of #ffffff to slip past the white clamp.

@media (prefers-color-scheme: dark) {
  .btn-bg  { background-color:#fffffe !important; } /* not #ffffff */
  .btn-txt { color:#13151a !important; }
}
/* border-radius lives on BOTH the td and the a */
Gmail · dark mode (web / Android)

A logo that stays legible when Gmail darkens

Problem

The wordmark has to read clearly after Gmail darkens the header background.

Why it breaks

Gmail supports neither prefers-color-scheme nor [data-ogsc] for swapping a light logo for a dark one, so the usual swap silently does nothing — the dark wordmark disappears into the dark background.

The fix

Don’t rely on a swap. Ship a logo “chip” — the dark wordmark on a white rounded plate — that stays legible on any background, light or dark.

<!-- one asset, reads on any background; no swap needed -->
<img src="https://pj-web.github.io/verto/assets/verto-logo-chip.png"
     width="104" alt="VERTO">
Outlook · Windows (Word engine)

A two-column grid that stacks on mobile

Problem

A 2-up product grid on desktop that collapses to a single column on narrow screens.

Why it breaks

A ghost <!--[if mso]><td> placed before the real <td> — without hiding the real one — makes Word see nested cells, which throws the column widths off.

The fix

Drop the ghost cells, give the real cells a pixel width plus valign="top" (Word respects a pixel width), and let the mobile stack come from CSS: .stack-column{width:100% !important} beats the presentational width attribute.

<!-- no ghost td before the real one -->
<td width="264" valign="top" class="stack-column">...</td>
<td width="264" valign="top" class="stack-column">...</td>

/* mobile: CSS !important overrides the HTML width attribute */
.stack-column { width:100% !important; display:block !important; }

Proof

The same email, across real clients

Each panel is the same email in a specific client — OS, dark or light, images on or off. Most are real devices and accounts; the legacy Outlook 2019 Word engine is rendered via testi.at. The images-off frame is the one a generated mockup can’t fake. Outlook appears three times on purpose: its new Windows client (Chromium), its Mac client (WebKit), and the classic Word engine each render email differently. Tap any frame to open the full render.

Gmail · Web (Chrome)
light · images on
Gmail · Web (Chrome) · light
VERTO email, full render — Gmail web, Chrome, light mode

Open full image ↗

Yahoo · Web (Chrome)
dark · images on
Yahoo · Web (Chrome) · dark
VERTO email, full render — Yahoo web, Chrome, dark mode

Open full image ↗

Apple Mail · macOS
dark · images on
Apple Mail · macOS · dark
VERTO email, full render — Apple Mail, macOS, dark mode

Open full image ↗

Gmail · Android
dark · images on
Gmail · Android · dark
VERTO email, full render — Gmail, Android, dark mode

Scroll inside · Open full image ↗

Apple Mail · iOS
light · images on
Apple Mail · iOS · light
VERTO email, full render — Apple Mail, iOS, light mode

Scroll inside · Open full image ↗

Outlook · Windows 11 (new)
dark · images on
Outlook · Windows 11 · dark · new Outlook (Chromium)
VERTO email, full render — new Outlook, Windows 11, dark mode

New Outlook renders on a Chromium engine · Open full image ↗

Outlook · macOS
dark · images off
Outlook · macOS · dark · images OFF
VERTO email, full render — Outlook, macOS, dark mode, images off (bulletproof ALT + solid colour fallback)

Bulletproof ALT + solid colour fallback — what a mockup can’t fake · Open full image ↗

Gmail · iOS
dark · images on
Gmail · iOS · dark
VERTO email, full render — Gmail, iOS, dark mode

Scroll inside · Open full image ↗

Outlook 2019 · Word engine
via testi.at · images on
Outlook 2019 · Word engine · via testi.at
VERTO email, full render — Outlook 2019 Word engine, square button + VML, via testi.at

The real Word engine: square button + VML · rendered via testi.at · Open full image ↗

How it was tested

Real inboxes first

Checked on real devices and accounts — Apple Mail, Gmail (web / Android / iOS), Outlook (web / macOS / Windows), Yahoo, AOL and Proton — with testi.at covering the clients I can’t reach directly. Feature support was checked against caniemail.com before each technique shipped, and spam scoring run through mail-tester.

  • real inboxes
  • testi.at
  • caniemail.com
  • mail-tester
  • Litmus / Email on Acid (at work)