Skip to content
Product engineering

Building Email Signatures That Survive Gmail

A Gmail-ready email signature generator that turns a four-step editor into email-safe HTML, serves icons in any colour as cacheable PNGs, and pairs the signature with ready-to-send email templates, all without an account.

3 min read0 comments
Website

Why it was needed

Most email signatures look right in a design tool and break in Gmail. Classes, style blocks, SVG icons and percentage widths get stripped, images stop loading, and the layout changes from one inbox to the next.

Gmail strips classes, style blocks and SVG, so every signature has to be built from tables with inline styles and fixed pixel widths. The photo and icons load from a public URL each time an email opens, so the image host must stay stable and cache-friendly. Mail apps' dark modes recolour text but never images, so icons have to stay readable on light and dark backgrounds. Gmail limits a signature to 10,000 characters, which every layout has to respect. There are no accounts or server-side storage, so the editor keeps each visitor's details in their own browser.

How it is built

A TanStack Start app renders the editor and email templates, a pure builder turns editor state into email-safe HTML, and a server route draws icons as long-cached PNGs on Netlify.

Generate email markup, not web markup. Signatures use tables, inline styles and fixed pixel widths with no classes or SVG, because that is the markup Gmail keeps intact.

Draw icons on request as versioned URLs. Any colour and style becomes a PNG at a stable URL, so there is no sprite sheet to maintain, and older icon versions stay unchanged for emails already sent.

Design for mail apps' dark modes. Outline icons sit on a white rounded square, invisible on a white email and a light tile on a dark one, so they never disappear when a mail app recolours the text.

Keep every detail in the browser. There are no accounts or server storage. Details persist in localStorage, and the limitation that clearing site data starts fresh is documented.

The key decision: Generate email markup, not web markup.

What changed

Designed the four-step editor and 26 named signature layouts, from photo-left and centred to banner, card, minimal, monogram and business-card styles. Built the email-safe signature builder with rich HTML, raw HTML and plain-text copy, Gmail setup steps, and a character count against Gmail's 10,000-character limit. Wrote the PNG icon renderer and the versioned, cache-friendly icon API route. Built the email templates page for job search, client work and meetings, with field-driven forms and shared details across templates. Set up CI for formatting, linting, type checking, tests and builds, added security headers, and deployed the server-rendered app to Netlify.

Signatures paste into Gmail and render as previewed, at the same size in any window. Twenty-six signature layouts, nine colour presets or any custom hex, and eight email-safe fonts ship from one editor. Icons in any colour are served as year-cached PNGs, and older icon versions remain available for emails already sent. Thirty-one automated tests cover the signature builder, email fields and icon renderer, and CI runs format, lint, type check, test and build on every push. Known limits are documented: images depend on the live site, Outlook on Windows shows round images as squares, and a content security policy is still to come.

My role: Product designer and full-stack engineer. Scope: Product design, email-safe HTML rendering, server-side icon rendering, editor experience, testing and deployment.

Working through a similar challenge?

Share your context, constraints, and timeline to start a focused conversation.