qmetrics.net

Premailer

Ruby gem for inlining HTML email CSS

Email & CommunicationDesktop/CLI app
Premailer screenshot

Premailer converts stylesheet and style-tag CSS into inline HTML attributes for email clients. It can absolutize URLs, check client capabilities, and optionally build a plain-text version.

Overview

Premailer is a Ruby library for preparing HTML email before send. Many clients render messages more reliably when CSS is inlined on elements; Premailer reads style and link rel=stylesheet blocks, merges them with existing inline styles, and writes HTML suited to common mail clients. Guidance follows Email Standards Project compatibility notes.

The gem resolves relative href, src, and CSS url() values to absolute URLs when a base is provided. It warns when properties may not render in specific clients. Optional plaintext output strips head and style content and inlines link text for images. Sections can be omitted from plaintext via HTML comment wrappers.

Premailer-specific CSS attributes such as -premailer-width and -premailer-cellpadding map table layout hints onto HTML attributes. Remote stylesheets with integrity attributes are verified; cssparser blocks fetching CSS from private hosts unless explicitly allowed for trusted HTML. Adapters include nokogiri by default and optional faster parsers.

Developers instantiate Premailer with HTML input, call to_inline_css for HTML and to_plain_text when needed, and inspect warnings. It installs from RubyGems or Bundler and is suited to Rails or standalone Ruby mail pipelines, with documented PostCSS steps for resolving CSS variables in email stylesheets.

Key features

  • CSS inlined into HTML attributes
  • style and stylesheet link processing
  • Relative to absolute URL conversion
  • Email client capability warnings
  • Optional plain-text generation
  • Premailer-specific table CSS hooks
  • Subresource integrity on remote CSS
  • Pluggable HTML parser adapters

Use cases

  • Newsletter HTML preprocessing
  • Rails mailer inline CSS step
  • Plain-text fallback for campaigns
  • Table-heavy email layout conversion
  • Validating CSS against client support

Tags

Similar software

RevokeMsgPatcher

Windows anti-recall patch for desktop WeChat, QQ, and TIM

A Windows utility that patches PC clients for WeChat, QQ, and TIM so recalled chat messages remain visible. It can optionally add multi-instance support for WeChat.

★ 39.4k⟳ 11 days agoGPL-3.0
Email & CommunicationDesktop/CLI app

BitChat

Decentralized Bluetooth and Nostr messaging

BitChat is a peer-to-peer messenger that uses Bluetooth mesh offline and Nostr relays online. It needs no accounts or phone numbers and routes private traffic over the best available transport.

★ 37.2k⟳ yesterdayUnlicense
Social NetworkingDesktop/CLI app

Signal

Private messenger Android client

Signal for Android: encrypted messaging, voice and video calls, and media over your data connection, with privacy features enabled by default

★ 29.7k⟳ 4 days agoAGPL-3.0
Email & CommunicationDesktop/CLI app

SmsForwarder

Android SMS and notification forwarding by rules

Android app that watches SMS, calls, and app notifications and relays them to phones, chat bots, email, webhooks, and push services

★ 29.1k⟳ 26 days agoBSD-2-Clause
Email & CommunicationDesktop/CLI app

listmonk

Self-hosted newsletter and mailing list manager in a single binary

Standalone, self-hosted newsletter and mailing list manager for e-mail campaigns and transactional messages. It ships as one binary, stores data in PostgreSQL, and includes a web dashboard.

★ 24.5k⟳ yesterdayAGPL-3.0
Open Source Alternative to:beehiivButtondown+4

PHPMailer

PHP email composition and SMTP transfer class

PHPMailer is a PHP library for building and sending email with attachments, HTML bodies, and SMTP authentication. It is widely embedded in CMS and application codebases.

★ 22.4k⟳ 3 days agoLGPL-2.1
Email & CommunicationDesktop/CLI app