Download htmlmail-8.x-2.64.tar.gztar.gz 29.95 KB
MD5: 6f0c7fd198c10283f1325a7f2be5224d
SHA-1: 3c48dcb4ba4aad0a8fd975e99e32f2ed2968bf68
SHA-256: 7aca3d5eee5ad0054309ebb470fa49bfc9dab2032ae27bd0a8aac06630368b2f
Download htmlmail-8.x-2.64.zipzip 39.05 KB
MD5: e1be474c1c18726c2a918d808121d104
SHA-1: 0f70d1cad3503ed13ca653e0febf7139d8a05c88
SHA-256: 3edc911d2bb6bfb9f82c2dabb038bf137cc8ba01758b0e6ea8ed8bfad0c90e26
Install with Composer: $ composer require 'drupal/htmlmail:^2.64'
Using Composer to manage Drupal site dependencies

Release info

Created by: pillarsdotnet
Created on: 19 Mar 2012 at 12:29 UTC
Last updated: 19 Mar 2012 at 12:30 UTC
Core compatibility: 8.x
Release type: Bug fixes

Release notes


#1272248: Presence of h3 tags in fieldset titles breaks certain themes.


Lets you theme your messages the same way you theme the rest of your website.



The following additional modules, while not required, are highly recommended:

  • Echo
    Wraps your messages in a drupal theme. Now you can "brand" your messages with the same logo, header, fonts, and styles as your website.
  • Emogrifier
    Converts stylesheets to inline style rules, for consistent display on mobile devices and webmail.
  • Mail MIME
    Provides a text/plain alternative to text/html emails, and automatically converts image references to inline image attachments.
  • Pathologic
    Converts urls from relative to absolute, so clickable links in your email messages work as intended.
  • Transliteration

    Converts non-ASCII characters to their US-ASCII equivalents, such as from Microsoft "smart-quotes" to regular quotes.

    Also available as a patch.

Updating from previous versions

The 8.x-2.x branch shares 94% of its code with the 6.x-2.x branch, but only 15% of its code with the 7.x-1.x branch, and a tiny 8% of its code with the 6.x-1.x branch.

Let your compatibility expectations be adjusted accordingly.

  • Check the module dependencies, as they may have changed.

  • Run update.php immediately after uploading new code.

  • The user-interface for adding email header and footer text has been removed. Headers and footers may be added by template files and/or by enabling the Echo module.

  • Any customized filters should be carefully tested, as some of the template variables have changed. Full documentation is provided both on the module configuration page (Click on the Instructions link) and as comments within the htmlmail.tpl.php file itself.

  • The following options have been removed from the module settings page. In their place, any combination of over 200 filter modules may be used to create an email-specific text format for post-template filtering.

  • Full MIME handling, including automatic generation of a plaintext alternative part and conversion of image references to inline image attachments, is available simply by enabling the Mail MIME module.


Visit the Mail System settings page at admin/config/system/mailsystem to select which parts of Drupal will use HTML Mail instead of the default mail system.

Visit the HTML Mail settings page at admin/config/system/htmlmail to select a theme and post-filter for your messages.


The email message text goes through three transformations before sending:

  1. Template File

    A template file is applied to your message header, subject, and body text. The default template is the included htmlmail.tpl.php file. You may copy this file to your email theme directory (selected below), and use it to customize the contents and formatting of your messages. The comments within that file contain complete documentation on its usage.

  2. Theming

    You may choose a theme that will hold your templates from Step 1 above. If the Echo module is installed, this theme will also be used to wrap your templated text in a webpage. You use any one of over 800 themes to style your messages, or create your own for even more power and flexibility.

  3. Post-filtering

    You may choose a text format to be used for filtering email messages after theming. This allows you to use any combination of over 200 filter modules to make final changes to your message before sending.

    Here is a recommended configuration:

    • Emogrifier Converts stylesheets to inline style rules for consistent display on mobile devices and webmail.

    • Transliteration Converts non-ASCII text to US-ASCII equivalents. This helps prevent Microsoft "smart-quotes" from appearing as question-marks in Mozilla Thunderbird.

    • Pathologic Converts relative URLS to absolute URLS so that clickable links in your message will work as intended.


  • Double-check the Mail System module settings and and make sure you selected HTMLMailSystem for your Site-wide default mail system.

  • Try selecting the [ ] (Optional) Debug checkbox at the HTML Mail module settings page and re-sending your message.

  • Clear your cache after changing any .tpl.php files.

  • If you use a post-filter, make sure your filter settings page looks like this.

  • Visit the issue queue for support and feature requests.

Related Modules



HTML Purifier



Mail System





Installing contributed modules

Theming guide

Original Author

Current Maintainer


The selected release is the release that will be used for automated testing. Optional projects are only used for testing.



No optional projects