Foundation for Emails

2.5.1 · active · verified Sun Apr 19

Foundation for Emails, currently at stable version 2.5.1, is a robust open-source framework designed for building responsive HTML emails that render consistently across various email clients, including challenging ones like Outlook. Originally known as Ink, it transitioned to a Sass-based codebase with its 2.0.0 release, incorporating the Inky templating language, which simplifies email layout by converting custom HTML tags into complex, client-compatible table structures. While releases were infrequent for several years, recent activity (v2.3.0, v2.4.0, v2.5.0, v2.5.1 between 2022-2024) indicates a more active maintenance phase. Its key differentiators include comprehensive testing across email clients, the Inky templating system, and support for both Node.js-based build workflows (via a template stack) and integration into Ruby on Rails projects via a dedicated gem.

Common errors

Warnings

Install

Quickstart

Sets up a new Foundation for Emails project using the official template, demonstrating the core `npm install`, `npm start`, and `npm run build` commands for local development and production compilation.

git clone https://github.com/foundation/foundation-emails-template my-responsive-email
cd my-responsive-email

# The README suggests Node.js <= 10, but recent updates may support newer. 
# If using nvm, uncomment and adjust:
# nvm install 10
# nvm use 10

# Install project dependencies (Gulp, Inky, Sass, etc.)
npm install

# Start the development server with live-reloading
# This will compile your Inky HTML, Sass, and inline CSS
npm start

# To build for production, which inlines all CSS
npm run build

# After `npm start`, edit `src/pages/index.html` (Inky HTML) and `src/assets/scss/app.scss` (Sass)
# Example Inky (in src/pages/index.html or a partial):
/*
<container>
  <row>
    <columns small="12" large="6">
      <h1>Hello, Responsive Email!</h1>
      <p>This is a Foundation for Emails template.</p>
      <button href="#">Click Me</button>
    </columns>
    <columns small="12" large="6">
      <img src="https://placehold.co/300x200" alt="Placeholder Image">
    </columns>
  </row>
</container>
*/

view raw JSON →