title: pear fatal Error: Class 'Mail' not found .wamp
body: <p>I am having some trouble with using the send mail functionality of pear with wamp. I went through with the steps in this link : (<a href="http://pear.php.net/manual/en/installation.checking.php" rel="nofollow">http://pear.php.net/manual/en/installation.checking.php</a>) to check if my pear was installed correctly, and it seems like I have it right.</p>
  
  <pre><code>&lt;?php
  require_once 'System.php';
  var_dump(class_exists('System', false));
  ?&gt;
  </code></pre>
  
  <p>The code above returns <code>bool(true)</code>. So I am assuming that my paths are set right.
  But for the code below I am getting an error.</p>
  
  <pre><code>&lt;?php    
      include 'Mail.php';
      include 'Mail/mime.php' ;
  
      $text = 'Text version of email';
      $html = '&lt;html&gt;&lt;body&gt;HTML version of email&lt;/body&gt;&lt;/html&gt;';
      $file = 'test.xls';
      $crlf = "\n";
      $hdrs = array(
                    'From'    =&gt; 'myemail@gmail.com',
                    'Subject' =&gt; 'Test mime message'
                    );
  
      $mime = new Mail_mime(array('eol' =&gt; $crlf));
  
      $mime-&gt;setTXTBody($text);
      $mime-&gt;setHTMLBody($html);
      $mime-&gt;addAttachment($file, 'text/plain');
  
      $body = $mime-&gt;get();
      $hdrs = $mime-&gt;headers($hdrs);
  
      $mail =&amp; Mail::factory('mail');
      $mail-&gt;send('myemail2@gmail.com', $hdrs, $body);
  ?&gt;
  </code></pre>
  
  <p>Error is on this line : <code>$mail =&amp; Mail::factory('mail');</code> . <code>Fatal error: Class 'Mail' not found</code></p>
  
  <p>Also, I installed pear Mail with this command : <code>pear install Mail Mail_mime</code></p>
  
  <p>I would appreciate any help.</p>
  
  <p>Thanks,</p>