title: Error message on sending test message with PEAR mail
body: <p>I have installed the latest versions of PEAR Mail and Mail_Mime and I'm trying to send a test message, using the following test email from <a href="http://www.phpmaniac.net/wiki/index.php/Pear_Mail" rel="nofollow">this page</a>, i.e.</p>
  
  <pre><code>&lt;?
          include('/home/****/php/Mail.php');
          include('/home/****/php/Mail/mime.php');
  
          // Constructing the email
          $sender = "**** &lt;info@****.com&gt;";                              // Your name and email address
          $recipient = "**** &lt;****@gmail.com&gt;";                           // The Recipients name and email address
          $subject = "Test Email";                                            // Subject for the email
          $text = 'This is a text message.';                                  // Text version of the email
          $html = '&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a html message&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;';  // HTML version of the email
          $crlf = "\n";
          $headers = array(
                          'From'          =&gt; $sender,
                          'Return-Path'   =&gt; $sender,
                          'Subject'       =&gt; $subject
                          );
  
          // Creating the Mime message
          $mime = new Mail_mime($crlf);
  
          // Setting the body of the email
          $mime-&gt;setTXTBody($text);
          $mime-&gt;setHTMLBody($html);
  
          $body = $mime-&gt;get();
          $headers = $mime-&gt;headers($headers);
  
          // Sending the email
          $mail =&amp; Mail::factory('mail');
          $mail-&gt;send($recipient, $headers, $body);
  ?&gt;
  </code></pre>
  
  <p>And the message is not getting sent. Checking my error log turned up:</p>
  
  <blockquote>
    <p>[24-Jul-2012 02:14:50] PHP Fatal error:  Call to undefined method
    Mail_mimePart::encodeHeader() in /home/<em>*</em>*/php/Mail/mime.php on
    line 1330</p>
  </blockquote>
  
  <p>I wonder if anyone knows what this error message relates to and what can be done about it?  Line 1330 in mime.php is the 4th line in this function:</p>
  
  <pre><code>function encodeHeader($name, $value, $charset, $encoding)
      {
          $mime_part = new Mail_mimePart;
          return $mime_part-&gt;encodeHeader(
              $name, $value, $charset, $encoding, $this-&gt;_build_params['eol']
          );
      }
  </code></pre>