Foundation for Emails is an open-source framework for building responsive HTML emails that render consistently across every major email client, including Outlook, by compiling simple Inky template tags into the complex table-based HTML that email clients require.
What is Foundation for Emails?
Foundation for Emails, previously known as Ink, is a framework maintained by the Foundation team. It provides a tested library of HTML and CSS components—containers, rows, columns, buttons, and menus—for constructing email layouts. The framework takes your email markup as input and uses the Inky templating language plus a Node.js build pipeline to output inlined HTML ready to send. It also ships as a Ruby gem for Rails integration.
Key Features
- Inky templating language — Write simple tags like
<container>,<row>, and<column>that compile into the nested tables required for reliable email layout. - Cross-client consistency — HTML/CSS components are tested across every major email client to ensure consistent rendering, even in Outlook.
- Template stack starter — The foundation-emails-template repository provides a pre-configured project; clone it, run
npm install, and start building. - Full CSS inlining — Running
npm run buildperforms a complete email inlining process, embedding CSS directly into the HTML. - Rails integration — Add
gem 'foundation_emails'to your Gemfile and@import "foundation-emails"in your stylesheet; the inky-rb gem bundles it for server-side Inky compilation. - Visual regression testing —
npm run test:visualcompiles test pages that can be uploaded to Litmus for cross-client testing. - Component library — Includes grid, block grid, button, and menu components that expand into full HTML syntax.
Who is it for?
- Email developers who need to produce responsive campaigns that look correct across clients like Outlook, Gmail, and Apple Mail.
- Rails developers who want to generate transactional or marketing emails using the foundation_emails and inky-rb gems.
- Agencies and design teams that value a tested component library for speeding up email production and keeping output consistent.
Use cases
- Marketing teams: assemble promotional email templates using pre-tested grid, button, and menu components.
- Transactional email developers: build reusable layouts for receipts, notifications, and password resets with the Rails gem.
- Agencies: rapidly deliver custom, responsive email designs for clients using the template stack and inlining pipeline.
How does it work?
- Clone the foundation-emails-template repository and install Node.js version 10 or lower.
- Run
npm install, then write your email using Inky tags and SCSS. - Run
npm startto preview in a BrowserSync browser window, ornpm run buildto produce final inlined HTML.
FAQ
Is Foundation for Emails free?
Yes, it is an open-source project. The code is available on GitHub under the Foundation organization, and you can file issues or submit pull requests directly.
What email clients are supported?
The framework's components are tested across every major email client, including Outlook, to ensure consistent rendering.
Do I need Node.js to use it?
The main template stack requires Node.js no greater than version 10. If you prefer a Ruby environment, you can use the foundation_emails gem inside a Rails project without Node.
What happens to the project in the future?
Starting with Inky v2.0, Foundation for Emails will merge into the Inky project. The styling portion becomes Inky Styles, and the Inky engine is being rewritten in Rust with bindings for JavaScript, PHP, Python, Ruby, and Go.








