Uses the emogrifier class library as an input filter to convert stylesheet rules to inline style attributes. This ensures proper display on email and mobile device readers that lack stylesheet support.


  1. Ensure that the PHP Document Object Model extension is available. Emogrifier requires the dom extension and will not work without it.

  2. Download, install, and enable the Libraries module.

  3. Create a library directory for the Emogrifier library in one of the following locations:

    • sites/all/libraries/emogrifier (recommended)
    • sites/DOMAIN/libraries/emogrifier
    • profiles/PROFILE/libraries/emogrifier

    DOMAIN is your website domain name, and PROFILE is the installation profile you selected when installing Drupal.

  4. Download the emogrifier library from GitHub or Pelage (author) and place it within the library directory you just created.

    Directory structure: sites/all/libraries/emogrifier/Classes/Emogrifier.php

  5. Install this module and enable it.

  6. Visit admin/settings/filters or click on

    Administer >> Site configuration >> Input formats

    to set up a new input format or add Emogrifier filtering to an existing format.

Project Information