title: PHP MAILER error autoload file
body: <p>i have a problem with php mailer .
  So on the tutorials he talks about the autoload file but when I download the folder phpmailer this file is not in , do I have to create it ?</p>
  
  <p>so I still try with the file phpmailer.php in the folder src but that puts me  error , here is the mistake :</p>
  
  <pre><code>Fatal error: Class 'PHPMailer' not found in C:\wamp64\www\site ajft\contact.php on line 14
  </code></pre>
  
  <p>here is my code: </p>
  
  <pre><code>    &lt;?php
  use League\OAuth2\Client\Grant\RefreshToken;
  ini_set("display_errors", 1); 
  error_reporting(E_ALL);
  
   $msg ="";
   if(isset($_POST['submit'])) {
  require 'phpmailer/src/PHPMailer.php';
  
      function sendmail($to, $from, $fromname, $tel , $body) {
      *(line 14)  $mail = new PHPMailer ;
          $mail-&gt;setFrom($from, $fromname);
          $mail-&gt;addAddress($to);
          $mail-&gt;Subject = 'Contact Form - Email';
          $mail-&gt;Body = $body;
          //$mail-&gt;isHTML(isHTML: false);
  
  
          return $mail-&gt;send();
      }
  
      $name = $_POST['nom'];
      $email = $_POST['mail'];
      $tel = $_POST['objet'];
      $body = $_POST['message'];
  
      if (sendmail('Myemail@lf.com', $email, $name , $tel, $body)) {
              $msg = 'email envoyé';
          } else
              $msg = 'email non envoyé';
  
      }
  
      ?&gt;
  </code></pre>
  
  <p>if anyone can tell me what to do to fix this problem, thanks in advance</p>