title: PHPMailer Classes - How to download the latest stable version from GitHub without Composer
body: <p>I am tasked to upgrade the currently implemented PHPMailer version 5.2.4 classes to the latest stable version of these classes for an ecommerce web application that is being migrated from PHP 5.6 to PHP 7.2. </p>
  
  <p>The site has been using PHPMailer version 5.2.4 and its related classes installed without using Composer without any issue for many years to generate transaction emails that are sent via a 3rd party SMTP email provider. </p>
  
  <p>I would like to upgrade the PHPMailer 5.2.4 classes to the latest stable version and to continue to use the classes in the code without deploying them via Composer. </p>
  
  <p>I am aware that as of PHPMailer version 6.0 that a namespace needs to be added to the code. </p>
  
  <pre><code>use PHPMailer\PHPMailer\PHPMailer;
  use PHPMailer\PHPMailer\Exception;
  use PHPMailer\PHPMailer\SMTP;
  
  require 'src/Exception.php';
  require 'src/PHPMailer.php';
  require 'src/SMTP.php';
  </code></pre>
  
  <p>I went to the PHPMailer project on GitHub and downloaded the following files from the GitHub Master Branch:</p>
  
  <p><a href="https://github.com/PHPMailer/PHPMailer/tree/master/src" rel="nofollow noreferrer">https://github.com/PHPMailer/PHPMailer/tree/master/src</a></p>
  
  <pre><code>src/PHPMailer.php
  src/Exception.php
  src/SMTP.php
  </code></pre>
  
  <p>I added the necessary namespaces to my existing code that uses these classes; and I also updated my existing exception handling code that was previously catching exceptions of type phpmailerException to now use the PHPMailer Exception Class namespace, and any existing Exception references use the global namespace; </p>
  
  <pre><code>...
  try {
  ...
  } catch (Exception $e) {
       //$e is an instance of PHPMailer\PHPMailer\Exception
      echo $e-&gt;errorMessage();
  } catch (\Exception $e) {
      //$e is an instance of the PHP built-in Exception class
      echo $e-&gt;getMessage();
  }
  </code></pre>
  
  <p>After making these updates everything worked fine to generate emails in my development environment running PHP version 7.2. </p>
  
  <p>I am ready to deploy the update to my site's Production/live server and would like to confirm that I have used the latest stable fully tested versions of the PHPMailer classes. </p>
  
  <p>I just have a somewhat silly question/concern:</p>
  
  <p>When using PHPMailer classes without using Composer I read in several tutorials to download these classes from the PHPMailer GitHub Project's Master Branch src. </p>
  
  <p>However, I also read in some tutorials to use Version 6.0 of PHPMailer. In addition, I seem to recall reading somewhere that the master branch is not guaranteed to be stable.</p>
  
  <p><strong>MY QUESTION:</strong>
  Was it correct that I used the <strong>GitHub Master Branch src</strong> to download the PHPMailer classes for use in my website if I wanted the latest stable fully tested versions of these clases? </p>
  
  <p>Or perhaps, should I use the GitHub 6.0 Branch src to download these class files? </p>
  
  <p>Adding to my confusion, I see that the only branch that is specifically labeled "stable" is the GitHub "5.2 Stable" Branch and its latest version is 5.2.27.</p>
  
  <p>On a related note, can you please clarify the following in the Master Branch:</p>
  
  <pre><code>**src/SMTP.php**  
  (has const VERSION = '6.0.6';)    
  
  **src/Exception.php**  
  Is there a reason that comments or code in this file does not mention Version 6.0.6?
  
  **src/PHPMailer.php**  
  Is there a reason that comments or code in this file does not mention Version 6.0.6?  
  </code></pre>
  
  <p>Thank you very much for your help. </p>