title: Fatal error: Class 'PHPMailer' not found in .../contact/mailtest/process.php on line 8
body: <p>I'm trying to make PHPMailer work, but it keeps giving me this error:</p>
  
  <blockquote>
    <p>Fatal error: Class 'PHPMailer' not found in /home/a4588543/public_html/contact/mailtest/process.php on line 8.</p>
  </blockquote>
  
  <p>and line 8 is:</p>
  
  <pre><code>$mail = new PHPMailer();
  </code></pre>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;?php
  
  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;
  
  require("class.phpmailer.php");
  
  $mail = new PHPMailer();
  
  $mail-&gt;IsSMTP();                                      // set mailer to use SMTP
  $mail-&gt;Host = "mysmtp-server";  // specify main and backup server
  $mail-&gt;SMTPAuth = true;     // turn on SMTP authentication
  $mail-&gt;Username = "me@mydomain.com";  // SMTP username
  $mail-&gt;Password = "pass"; // SMTP password
  
  $mail-&gt;From = "me@mydomain.com";
  $mail-&gt;FromName = "Online Request";
  $mail-&gt;AddAddress("receiver@mydomain.com");                  // name is optional
  
  
  $mail-&gt;WordWrap = 50;                                 // set word wrap to 50 characters
  $mail-&gt;IsHTML(true);                                  // set email format to HTML
  
  $mail-&gt;Subject = "Contact Form";
  $mail-&gt;Body    = $message;
  $mail-&gt;AltBody = $message;
  
  if(!$mail-&gt;Send())
  {
     echo "Message could not be sent. &lt;p&gt;";
     echo "Mailer Error: " . $mail-&gt;ErrorInfo;
     exit;
  }
  
  echo "Message has been sent";
  ?&gt;
  </code></pre>