HTML Mail

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

Requirement

Installation

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

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.

Configuration

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.

Theming

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:

Troubleshooting

Related Modules

Echo

http://drupal.org/project/echo

Emogrifier

http://drupal.org/project/emogrifier

HTML Purifier

http://drupal.org/project/htmlpurifier

htmLawed

http://drupal.org/project/htmlawed

Mail MIME

http://drupal.org/project/mailmime

Mail System

http://drupal.org/project/mailsystem

Pathologic

http://drupal.org/project/pathologic

Transliteration

http://drupal.org/project/transliteration

Documentation

filter.module
api.drupal.org/api/drupal/modules--filter--filter.module

api.drupal.org/api/drupal/modules--filter--filter.module/group/standard_filters/8

Installing contributed modules

drupal.org/documentation/install/modules-themes/modules-7

Theming guide

drupal.org/documentation/theme

Original Author

Current Maintainer