title: PHPMailer not sending emails and not returning error
body: <p>Is there anything wrong with these configuration files?</p>
  
  <p><strong><em>Email.class.php</em></strong></p>
  
  <pre><code>&lt;?php
  
      class Email{
  
          public static function Send($to, $subject, $body){
  
              if(Config::Email()-&gt;Enable != true) return true;
  
              try{
  
                  $mail = new \PHPMailer\PHPMailer\PHPMailer;
                  $mail-&gt;Debug = 
                  $mail-&gt;SMTPOptions = array(
                      "ssl" =&gt; array(
                          "verify_peer" =&gt; false,
                          "verify_peer_name" =&gt; false,
                          "allow_self_signed" =&gt; true
                      )
                  );
                  $mail-&gt;isSMTP();
                  $mail-&gt;SMTPAuth = true;     
                  $mail-&gt;Host = Config::Email()-&gt;Hostname;
                  $mail-&gt;SMTPSecure = Config::Email()-&gt;Encryption;
                  $mail-&gt;Port = Config::Email()-&gt;Port;
                  $mail-&gt;Username = Config::Email()-&gt;Username;
                  $mail-&gt;Password = Config::Email()-&gt;Password;
  
                  $mail-&gt;setFrom(Config::Email()-&gt;Username, Config::Email()-&gt;Name);
                  $mail-&gt;addReplyTo(Config::Email()-&gt;Username, Config::Email()-&gt;Name);
                  $mail-&gt;addAddress($to);
  
                  $mail-&gt;isHTML(true);
                  $mail-&gt;Subject = $subject;
                  $mail-&gt;Body = $body;
                  //$mail-&gt;AltBody = $alt;
  
                  $result = $mail-&gt;send();
  
                  if(!$result &amp;&amp; Config::Debug()-&gt;Email) IO::Dump($mail-&gt;ErrorInfo);
  
                  return $result;
  
              }catch(Exception $e){
  
                  if(Config::Debug()-&gt;Email) IO::Dump($e);
  
                  return false;
  
              }
  
          }
  
      }
  
  ?&gt;
  </code></pre>
  
  <p><strong><em>Config File</em></strong></p>
  
  <pre><code>;Config
  
  [Email]
      Enabled         =   true
      Hostname        =   "domain.tld"
      Encryption      =   "STARTTLS"
      Port            =   "587"
      Username        =   "admin@domain.tld"
      Password        =   "admin$#@!1"
      Name            =   "Admin"
  
  [Cache]
      Enabled         =   true
      Lifespan        =   3600
  
  [Debug]
      Errors          =   true
      Parser          =   false
      Database        =   false
      Email           =   true
  </code></pre>
  
  <p>My application is not sending emails - however, it is not returning errors either. I am just making sure the configuration options are defined correctly.</p>