Download mailmime-7.x-2.17.tar.gztar.gz 18.82 KB
MD5: 290793bb1a7c75a0c6a5eeb095e66382
SHA-1: 2ee6f0fbf83b9468dfea754e55a5bc0d1b79f75c
SHA-256: 058b18b2915f77d71fff2ab591342de001cedebbaf03e6512303ae372525bfaa
Download mailmime-7.x-2.17.zipzip 22.01 KB
MD5: c924b50385de9560840ed13133ec79fd
SHA-1: 9e1ff290578741a29d9063b81f0dbb038814388a
SHA-256: b166ecedd6e4d4c71768f8884821093e47a3d89df65f04f031a1027164658ccc
Install with Composer: $ composer require 'drupal/mailmime:^2.17'
Using Composer to manage Drupal site dependencies

Release info

Created by: pillarsdotnet
Created on: 12 Apr 2012 at 17:41 UTC
Last updated: 30 May 2014 at 07:48 UTC
Core compatibility: 7.x
Release type: Bug fixes

Release notes


#1417646: Cannot download Mail_Mime from SVN repo via Include module

#1528684: PHP Parse error: erroneous '$' in MailMIME::addHTMLImage() function at line 254 of file


Provides a class for creating MIME messages.

  • NOTE: This module does not send mail.
    If you came here looking for a mail-sending module, try HTML Mail (which can use this module for MIME-handling) or Mime Mail (which comes with its own MIME-handling library).

Mail Mime extends certain PEAR mail-handling classes to provide a drupal-friendly library for creating and parsing MIME messages. Neither Mail Mime nor the original PEAR classes send mail nor do anything useful on their own. They are intended as code libraries to be used by other programs that send or receive mail.

Mail Mime started out as part of HTML Mail. I separated into its own module for two reasons:

  1. The separation helped clarify in my own mind which parts of the mail-sending process require MIME and which do not. The resulting code is simpler and easier to maintain.

  2. It is possible that another mail-sending or mail-reading module may find the Mail Mime library useful.


The following files, available from PEAR, must be installed and available somewhere on the include_path.

  • Mail/mime.php
  • Mail/mimeDecode.php
  • Mail/mimePart.php
  • PEAR.php
  • PEAR5.php

  • One way to satisfy the requirements is to run the following command from a Unix root shell prompt:

    pear install -a Mail_Mime

    The -a parameter ensures that dependencies, including Mail/mimeDecode.php and Mail/mimePart.php, are also installed.

  • Another way is to install and enable the Include module before enabling the Mail MIME module.


  1. Download and install as usual.

  2. When enabled, Mail Mime will

    • Auto-detect whether the required files are present.

    • If any files are missing, and the Include module is available, Mail Mime will use Include to auto-download and enable the missing files.

    • If all of the above fails, Mail Mime will disable itself and print a warning to both the screen and the error log.


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


No required projects


No optional projects