You are here

README.html in Mail MIME 7.2

Same filename and directory in other branches
  1. 8.2 README.html
  2. 6.2 README.html

File

README.html
View source
<h2><a href="http://drupal.org/project/mailmime">Mail MIME</a></h2>
<p>Provides a class for creating MIME messages.</p>
<ul>
  <li>
    <dl>
      <dt><em>NOTE: This module does not send mail.</em></dt>
      <dd>If you came here looking for a mail-sending module, try <a href="http://drupal.org/project/htmlmail">HTML Mail</a> (which can use this module for MIME-handling) or <a href="http://drupal.org/project/mimemail">Mime Mail</a> (which comes with its own MIME-handling library).</dd>
    </dl>
  </li>
</ul>
<p><a href="http://drupal.org/project/mailmime">Mail Mime</a> extends certain <a href="http://pear.php.net/">PEAR</a> mail-handling classes to provide a drupal-friendly library for creating and parsing MIME messages. Neither <a href="http://drupal.org/project/mailmime">Mail Mime</a> nor the original <a href="http://pear.php.net/">PEAR</a> classes send mail nor do anything useful on their own. They are intended as code libraries to be used by <em>other</em> programs that send or receive mail.</p>
<p><a href="http://drupal.org/project/mailmime">Mail Mime</a> started out as part of <a href="http://drupal.org/project/htmlmai">HTML Mail</a>. I separated into its own module for two reasons:</p>
<ol style="list-style-type: decimal;">
  <li>
    <p>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.</p>
  </li>
  <li>
    <p>It is possible that another mail-sending or mail-reading module may find the <a href="http://drupal.org/project/mailmime">Mail Mime</a> library useful.</p>
  </li>
</ol>
<h3><a id="requirements" name="requirements">Requirements</a></h3>
<p>The following files, available from <a href="http://pear.php.net/">PEAR</a>, must be installed and available somewhere on the <a href="http://php.net/manual/ini.core.php#ini.include-path"><code>include_path</code></a>.</p>
<ul>
  <li><code>Mail/mime.php</code></li>
  <li><code>Mail/mimeDecode.php</code></li>
  <li><code>Mail/mimePart.php</code></li>
  <li><code>PEAR.php</code></li>
  <li>
    <p><code>PEAR5.php</code></p>
  </li>
  <li>
    <p>One way to satisfy the requirements is to run the following commands from a Unix root shell prompt:</p>
    <p><code>pear install -a Mail_Mime</code></p>
    <p><code>pear install Mail_mimeDecode</code></p>
    <p>The <code>-a</code> parameter ensures that dependencies, including <code>Mail/mimePart.php</code>, are also installed.</p>
  </li>
  <li>
    <p>Another way is to install and enable the <a href="http://drupal.org/project/include">Include</a> module before enabling the <a href="http://drupal.org/project/mailmime">Mail MIME</a> module.</p>
    <p>If the Include module fails to download the <b>mimeDecode.php</b> file you have to download this file manually from the <a href="http://svn.php.net/repository/pear/packages/Mail_mimeDecode/trunk/Mail/mimeDecode.php">PEAR repository</a> and move it to the /include directory inside Drupal's default files location (usually the path to the file is sites/default/files/include/Mail/mimeDecode.php).</p>
  </li>
</ul>
<h3><a href="http://drupal.org/documentation/install/modules-themes/modules-5-6">Installation</a></h3>
<ol style="list-style-type: decimal;">
  <li>
    <p>Download and install <a href="http://drupal.org/documentation/install/modules-themes/modules-5-6">as usual</a>.</p>
  </li>
  <li>
    <p>When enabled, <a href="http://drupal.org/project/mailmime">Mail Mime</a> will</p>
    <ul>
      <li>
        <p>Auto-detect whether the required files are present.</p>
      </li>
      <li>
        <p>If any files are missing, and the <a href="http://drupal.org/project/include">Include</a> module is available, <a href="http://drupal.org/project/mailmime">Mail Mime</a> will use <a href="http://drupal.org/project/include">Include</a> to auto-download and enable the missing files.</p>
      </li>
      <li>
        <p>If all of the above fails, <a href="http://drupal.org/project/mailmime">Mail Mime</a> will disable itself and print a warning to both the screen and the error log.</p>
      </li>
    </ul>
  </li>
</ol>