title: problem sending mail with PHPMailer on AWS AMI instance
body: <p>I'm fairly new to UNIX, coming from a Windows background.
  I've created an instance on Amazon EC2 and installed apache, PHP and MySQl.
  i've successfully uploaded the files for a PHP website.
  Everything works well, except i have a problem sending mails from a contact form.</p>
  
  <p>i went through the AWS tutorial here: <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-php.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-php.html</a></p>
  
  <p>i successfully installed composer and ran it in Putty and i see the vendor directory is created and the phpmailer files are downloaded.</p>
  
  <p>site structure looks like this:</p>
  
  <pre><code>html
  test_mail.php
  --vendor
  ----bin
  ----composer
  ----phpmailer
  ----autoload.php
  </code></pre>
  
  <p>I've tried using the sample email script included in the tutorial which looks something like this :</p>
  
  <pre><code>// If necessary, modify the path in the require statement below to refer to the 
  // location of your Composer autoload.php file.
  require 'vendor/autoload.php';
  
  use PHPMailer\PHPMailer\PHPMailer;
  
  // Instantiate a new PHPMailer 
  $mail = new PHPMailer;
  
  // Tell PHPMailer to use SMTP
  $mail-&gt;isSMTP();
  
  $mail-&gt;SMTPDebug = 2;
  
  // Replace sender@example.com with your "From" address. 
  // This address must be verified with Amazon SES.
  $mail-&gt;setFrom('sender@example.com', 'Sender Name');
  </code></pre>
  
  <p>but i get the following error:</p>
  
  <pre><code>Fatal error: Uncaught Error: Class 'PHPMailer\PHPMailer\PHPMailer' not found in /var/www/testSite/html/test_mail.php:10 Stack trace: #0 {main} thrown in /var/www/testSite/html/test_mail.php on line 10
  </code></pre>
  
  <p>line 10 is</p>
  
  <pre><code>$mail = new PHPMailer;
  </code></pre>
  
  <p>so i'm stumped as to what the problem is.
  The required PHPMailer files seem to have been created correctly by composer, and the path to 'vendor\autoload.php' should be correct.</p>
  
  <p>is it possible there's something in the server setup I've missed?</p>
  
  <p>any suggestions gratefully received.</p>
  
  <p>David</p>