Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Menu Link Attributes 8.x-1.9 — Minor update available for module menu_link_attributes (8.x-1.9). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: PhotoSwipe - Responsive JavaScript Modal Image Gallery 5.0.11 — Minor update available for module photoswipe (5.0.11). Release: Search API attachments 10.0.13 — Minor update available for module search_api_attachments (10.0.13). Release: amazee.ai Private AI Provider 1.4.6 — Minor update available for module ai_provider_amazeeio (1.4.6). Release: amazee.ai Private AI Provider 1.3.10 — Minor update available for module ai_provider_amazeeio (1.3.10). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Magic HTML Mail

No security coverage Drupal 10–11 PHP >=8.1
View on drupal.org

HTML Mail enables Drupal to send clean, fully formatted HTML emails with twig-based template customization, inline CSS styling, and reliable plain-text fallbacks.

By default, Drupal core sends plain-text emails for user registrations, password resets, and module notifications. HTML Mail replaces plain text with structured, beautifully styled HTML emails. It allows site builders and developers to apply custom Twig templates, wrap outbound system emails in site branding, and ensure consistent rendering across all major email clients.

Features

  • HTML Formatting for Outbound Mail: Automatically converts core and module system emails into clean HTML messages.
  • Twig Template Integration: Override email layouts and components using standard Drupal theme Twig templates.
  • Automatic CSS Inlining: Integrates CSS styling directly into email HTML tags to prevent broken layouts in strict mail clients (like Gmail or Outlook).
  • Multipart Plain-Text Fallback: Automatically generates plain-text alternative versions for mail clients that do not support HTML rendering.
  • Module & Mailer Compatibility: Seamlessly hooks into Drupal’s core Mail API and works alongside modern mail transport modules like Symfony Mailer or Mailsystem.

Post-Installation

  1. Install and enable the module via Composer or Drush.
  2. Navigate to Administration → Configuration → System → HTML Mail (/admin/config/system/html_mail).
  3. Configure your default mail formatting settings, CSS stylesheet attachments, and fallback plain-text rules.
  4. (Optional) Copy the provided html-mail.html.twig template file into your custom theme directory to customize headers, footers, or wrapper branding.

Additional Requirements

  • Drupal Core: ^10.3 || ^11
  • System Requirements: A configured mail subsystem or transport module (e.g. Symfony Mailer, SMTP, or core PHP Mail) to deliver outbound messages.

Recommended modules/libraries

  • Symfony Mailer: Provides modern SMTP and API transport layer integrations for seamless email delivery.
  • Magic Login: Pairs well to send beautifully branded, passwordless sign-in links and 6-digit codes to users.

Similar projects

While modules like swiftmailer or legacy mailsystem setups offer complex mail handling, HTML Mail focuses on lightweight, direct HTML formatting and template override capabilities native to modern Drupal 10.3+ and 11 environments without unneeded overhead.

Supporting this Module

If you find this module useful in styling your site's transactional emails, consider starring the repository on GitHub or reporting feedback in the issue queue to assist ongoing maintenance.

Community Documentation

For complete template customization guidelines, hook definitions, and configuration examples, refer to the project README in

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Oct 2026
Latest release
1 hour ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0 Stable 10–11 Oct 8, 2026