SharePointVault ~/gotchas/graph ⌕ Search 404 pages, error messages, scripts…Ctrl K ★ Star
M↓ README.mdM↓ email-html-built-like-a-web-page-breaks-in-outlook.md
sharepoint-vault›gotchas›graph›email-html-built-like-a-web-page-breaks-in-outlook.mdhistoryedit on GitHub
● GOTCHAgraph· 2 min read

E-mail HTML built like a web page falls apart in Outlook

applies to: HTML e-mail sent from your app (Microsoft Graph sendMail or any other channel); classic Outlook for Windows, Gmailreviewed: 2026-09-24#graph#email#sendmail#html#outlook

Classic Outlook for Windows renders HTML mail with Word's engine, so a message built like a web page — <div> layout, flexbox, rounded corners, a gradient behind white text — arrives scattered, and text set on a gradient can vanish. Build mail from nested tables with solid colours and literal values inline, send a complete HTML document, and keep it small: Gmail clips messages over about 102 KB.

Klasický Outlook pro Windows vykresluje HTML poštu enginem Wordu, takže zpráva postavená jako webová stránka – rozvržení z <div>, flexbox, zaoblené rohy, přechod za bílým textem – dorazí rozsypaná a text na přechodu může zmizet. Stav e-mail z vnořených tabulek s plnými barvami a hodnotami zapsanými přímo u prvků, posílej úplný HTML dokument a drž ho malý: Gmail zprávy nad zhruba 102 kB ořezává.

Symptom

A news digest looks right in a browser preview. In desktop Outlook the header band has no background — it was a linear-gradient — so its white heading is invisible; rounded corners and shadows are gone; blocks stack without spacing. The message is also 171 kB.

Cause

The HTML was a web page: a <div> root, layout through <div>s and CSS, a gradient as the only background of the header, border-radius and box-shadow, no <!DOCTYPE> and no <body>. Classic Outlook for Windows renders HTML mail with Word, which has no flexbox, ignores border-radius and box-shadow, and does not paint CSS gradients — the band came out white, with white text on it.

Fix

  1. Tables, not <div>s. <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="640">, nested tables for columns, align and valign as attributes.
  2. Never let contrast depend on a gradient. Give a coloured band a solid background-color; a gradient may at most decorate on top of it.
  3. Send a complete document: <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="color-scheme" content="light only">…</head><body>…</body></html>. Without it the client picks its own defaults, and in dark mode it may repaint your colours.
  4. Literal values, inline. No CSS custom properties — classic Outlook for Windows does not support them, and Gmail supports var() but not the declarations — and web-safe font stacks such as Segoe UI, Arial, sans-serif or Georgia, serif rather than your brand's web fonts.
  5. Keep it small. Gmail clips messages larger than about 102 KB of HTML behind a "View entire message" link, and long HTML raises spam-filter scores. Cap the items per section and link to the rest: our digest went from 171 kB to 12 kB.

Notes

References

Was this helpful?ask or add your experience on GitHub →
Saved you an hour? A star on GitHub helps other SharePoint people find the vault.★ Star on GitHub
last reviewed: 2026-09-24last updated: 2026-09-25historyedit on GitHubview source