Install

Works with Drupal: 7.x

Using Composer to manage Drupal site dependencies

Downloads

Download tar.gz 19.29 KB
MD5: 3c750b0fa9b2893698f7e64abd0619b3
SHA-1: 68a848f032b9c5621f84991b047c74214d09182e
SHA-256: cd23b1c0b48be5b33a844e0fcc9c812996260cee12114efa14518b0a37f3b652
Download zip 26.09 KB
MD5: eeb8fa9cda9b9ac0bc24f89cf90156c5
SHA-1: d346381340721896aa7e2c30c2049c4129b02c1e
SHA-256: 169236831c5616e095ad60e1bb863d1c3225f8cb1899e462e8dbb063c23fb724

Release notes

Added a sample template for simplenews, and improved template debugging info.

HTML Mail

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

Requirements

Installation

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.

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 default theme directory 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

    (Optional: requires Echo module.) The templated text may be wrapped in a website theme. This lets you use any one of over 800 themes to style your messages. Creating an email-specific sub-theme lets you use the full power of the drupal theme system to format your messages.

  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.

Troubleshooting

Visit the issue queue for support and feature requests.

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
D6: http://api.drupal.org/api/drupal/modules--filter--filter.module/6
D7: http://api.drupal.org/api/drupal/modules--filter--filter.module/7

D7: http://api.drupal.org/api/drupal/modules--filter--filter.module/group/st...

Installing contributed modules
D6: http://drupal.org/documentation/install/modules-themes/modules-5-6

D7: http://drupal.org/documentation/install/modules-themes/modules-7

Theming guide

http://drupal.org/documentation/theme

Original Author

Current Maintainer

Created by: pillarsdotnet
Created on: 9 Apr 2011 at 01:21 UTC
Last updated: 17 Oct 2018 at 22:55 UTC
New features
Insecure
Unsupported

Other releases