title: PHPMailer 6 Composer Not Working
body: <p>How do I setup PHPMailer properly to get it to work on the server.</p>
  
  <p>I have set it up like in the example provided.</p>
  
  <p>One I upload a file the <code>upload.php</code> file is ran but all I get back is a 500 Internal Server Error.</p>
  
  <p><strong>=============== EDIT ===============</strong></p>
  
  <p>Problem seems to be PHP version 5.3.3</p>
  
  <p>This setup works on PHP version ^7</p>
  
  <p>.</p>
  
  <p><strong>server setup</strong></p>
  
  <pre><code>/ root
  - uploads.php
  - form.html
  - vendor (dir)
    - composer (dir)
    - phpmailer (dir)
    - autoload.php
  </code></pre>
  
  <p>.</p>
  
  <p><strong>form.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;form action="upload.php" method="POST" enctype="multipart/form-data"&gt;
        &lt;input type="file" name="file"&gt;
        &lt;button type="submit" name="submit"&gt;Upload&lt;/button&gt;
      &lt;/form&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>.</p>
  
  <p><strong>upload.php</strong></p>
  
  <pre><code>&lt;?php
  use PHPMailer\PHPMailer\PHPMailer;
  use PHPMailer\PHPMailer\Exception;
  
  require './vendor/autoload.php';
  
  if ($_SERVER['REQUEST_METHOD'] === 'POST') {
  
    $mail = new PHPMailer; // &lt;-- error on this line
    echo "after phpmailer"; // &lt;-- does not run
  
    // phpmailer code here ...
  
  }
  </code></pre>