title: Fatal error: require(): Failed opening required '../PHPMailerAutoload.php' (include_path='.:/usr/local/php56/pear')
body: <p>First time using PHPMailer, and can't seem to get passed this require error .. I installed composer did the require PHPMailer/PHPMailer and tried changing the paths .. but still can't pass this error message: </p>
  
  <blockquote>
    <p>Fatal error: require(): Failed opening required
    '../PHPMailerAutoload.php' (include_path='.:/usr/local/php56/pear') in
    /home/hiinfo53/public_html/grandbluehawaii.com/cgifile/contact_phpmailer.php
    on line 15</p>
  </blockquote>
  
  <pre><code>&lt;?php
  /**
   * This example shows how to handle a simple contact form.
   */
  
  echo getcwd();
  $msg = '';
  //Don't run this unless we're handling a form submission
  if (array_key_exists('email', $_POST)) {
      date_default_timezone_set('Etc/UTC');
  
  
     require '../PHPMailerAutoload.php';
  
      //Create a new PHPMailer instance
  
      $mail = new PHPMailer;
      //Tell PHPMailer to use SMTP - requires a local mail server
      //Faster and safer than using mail()
      $mail-&gt;isSMTP();
      $mail-&gt;Host = 'usm1260.sgded.com';
      $mail-&gt;Port = 465;
      $mail-&gt;SMTPSecure = 'ssl';
      //Use a fixed address in your own domain as the from address
      //**DO NOT** use the submitter's address here as it will be forgery
      //and will cause your messages to fail SPF checks
      $mail-&gt;setFrom('contact@grandbluehawaii.com', 'First Last');
      //Send the message to yourself, or whoever should receive contact for submissions
      $mail-&gt;addAddress('gail@hiinfo.com', 'Grand Blue Hawaii');
      //Put the submitter's address in a reply-to header
      //This will fail if the address provided is invalid,
      //in which case we should ignore the whole request
      if ($mail-&gt;addReplyTo($_POST['email'], $_POST['name'])) {
          $mail-&gt;Subject = 'A user has contacted you from grandbluehawaii.com';
          //Keep it simple - don't use HTML
          $mail-&gt;isHTML(false);
          //Build a simple message body
          $mail-&gt;Body = &lt;&lt;&lt;EOT
  "Aloha,\n\n"
  "A user visiting grandbluehawaii.com has sent you a message".\n\n"
  "Please make sure any Reply-To's this email is directed to user's email address".\n\n"
  Email: {$_POST['email']}
  Name: {$_POST['name']}
  Message: {$_POST['message']}
  EOT;
          //Send the message, check for errors
          if (!$mail-&gt;send()) {
              //The reason for failing to send will be in $mail-&gt;ErrorInfo
              //but you shouldn't display errors to users - process the error, log it on your server.
              $msg = 'Sorry, something went wrong. Please try again later.';
          } else {
              $msg = 'Message sent! Mahalo for contacting Grand Blue Hawaii.';
          }
      } else {
          $msg = 'Invalid email address, message ignored.';
      }
  }
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Contact form&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;Contact us&lt;/h1&gt;
  &lt;?php if (!empty($msg)) {
      echo "&lt;h2&gt;$msg&lt;/h2&gt;";
  } ?&gt;
  &lt;form method="POST"&gt;
      &lt;label for="name"&gt;Name: &lt;input type="text" name="name" id="name"&gt;&lt;/label&gt;&lt;br&gt;
      &lt;label for="email"&gt;Email address: &lt;input type="email" name="email" id="email"&gt;&lt;/label&gt;&lt;br&gt;
      &lt;label for="message"&gt;Message: &lt;textarea name="message" id="message" rows="8" cols="20"&gt;&lt;/textarea&gt;&lt;/label&gt;&lt;br&gt;
      &lt;input type="submit" value="Send"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>