title: Phpmailer error "Could not instantiate mail function"
body: <p>I'm using the <code>mail()</code> basic example modified slightly for my user id and I'm getting the error &quot;Mailer Error: Could not instantiate mail function&quot;</p>
  <p>if I use the mail function  -</p>
  <pre><code>mail($to, $subject, $message, $headers);
  </code></pre>
  <p>it works fine, though I'm having trouble sending HTML, which is why I'm trying PHPMailer.</p>
  <p>this is the code:</p>
  <pre><code>&lt;?php
  require_once('../class.phpmailer.php');
  
      $mail             = new PHPMailer(); // defaults to using php &quot;mail()&quot;
      $body             = file_get_contents('contents.html');
      $body             = eregi_replace(&quot;[\]&quot;,'',$body);
          print ($body ); // to verify that I got the html
      $mail-&gt;AddReplyTo(&quot;reply@example.com&quot;,&quot;my name&quot;);
      $mail-&gt;SetFrom('from@example.com', 'my name');
      $address = &quot;to@example.com&quot;;
      $mail-&gt;AddAddress($address, &quot;her name&quot;);
      $mail-&gt;Subject    = &quot;PHPMailer Test Subject via mail(), basic&quot;;
      $mail-&gt;AltBody    = &quot;To view the message, please use an HTML compatible email viewer!&quot;;
      $mail-&gt;MsgHTML($body);
      $mail-&gt;AddAttachment(&quot;images/phpmailer.gif&quot;);      // attachment
      $mail-&gt;AddAttachment(&quot;images/phpmailer_mini.gif&quot;); // attachment
  
      if(!$mail-&gt;Send()) {
          echo &quot;Mailer Error: &quot; . $mail-&gt;ErrorInfo;
      } else {
          echo &quot;Message sent!&quot;;
      }
  ?&gt;
  </code></pre>