In this video, we will install the modules required in order to apply a theme to our newsletters.If we look at the HTML Mail project page, you can see that there are a few additional recommended modules. I'm going to use all of these except for Mail MIME. (I had an incredibly difficult time trying to get this to work, and after two solid days of trial and error (mostly error) I gave up. Since this is not required, I decided to release the series without it, and add it later, when I have more time to devote to getting it figured out.)

Install Emogrifier library

The Emogrifier module requires a library in order to work, so I'm going to download and install that library before I download these modules.

If we go to the Emogrifier project page, we see the installation instructions right away.

  1. You'll need to check step one on your own, since every server is different. Most hosts do have this available by default though. I use Media Temple and didn't need to make any changes, so, it's possible that you won't either.
  2. I'm going to do step two out of order. I'll download the Libraries module in just a minute at the same time as the other modules.
  3. I will go ahead and follow the first suggestion for step 3
    • In the terminal, I'll type "pwd" to see where I am.
    • I need to move up one directory, and then into the "all" directory. So, I'll type "../all/"
    • Now I'll create the "emogrifier" folder inside a "libraries" folder by typing "mkdir libraries" then typing "mkdir libraries/emogrifier"
    • (You can do this using an FTP program for a remote server, or in Finder (on a Mac) or Windows explorer (on windows). Regardless of how you do it, you should now have a folder at "[drupal-root]/sites/all/libraries")
  4. Click the "Download" link to visit the website where we can download the Emogrifier PHP source code. You'll find the link under the "How it Works" section. You can download and unzip it anyway you want. I'm going to use the terminal.
    • Right click the download link and choose "Copy link location"
    • Move into the emogrifier directory by typing "cd libraries/emogrifier"
    • Download the file by typing "wget http://www.pelagodesign.com/emogrifier/emogrifier.zip"
    • Unzip the file by typing "unzip emogrifier.zip"
    • (You should be left with the file "emogrifier.php" at "sites/all/libraries/emogrifier/emogrifier.php"
    • Delete the zip file by typing "rm emogrifier.zip"
  5. We will install and enable the module in just a minute, so we're finished for now.
  6. Because Step 6 shows you where to configure your text formats, and we'll be doing that in the next video.

Now we're ready to install the recommended modules.

Install modules: Echo, Emogrifier, Transliteration

I'll double check the HTML Mail project page to make sure that I download the correct modules. (When using drush, you use the part of the project page address that comes after "project/" and even though Transliteration is listed, we're actually going to install "Filter transliteration" which is a filter for text formats. So it's a good idea to check the modules by clicking on the links, or hovering over them to see what you need to type.)

  • I'll move back into the modules folder by typing "cd ../../modules"
  • drush dl echo emogrifier filter_transliteration
  • drush en echo emogrifier filter_transliteration

And you'll notice that emogrifier requires the "libraries" module and that filter_transliteration requires the "transliteration" module. Drush asks if I want to download them, and I do, so I'll just type "y" and hit enter. Then we are notified that the projects have been downloaded successfully, and we are asked once again if we want to enable the modules (libraries and transliteration have been automatically included this time). So, I'll just type "y" and hit enter again.

So, if we go back to our modules page, and refresh, you'll see that we have all of the modules installed and enabled, ready to go.