title: PHPMailer Sending Duplicate Emails
body: <p>I'm having a small issue with getting my php mailer to send a single email, it keeps sending a duplicate with it. I've check whether the script is being ran twice by putting a random number on the end of the subject but surprisingly, both emails have the same subject which rules that one out. So I thought the best thing would be to get another set of eyes to have a look and see if they can work out where I might be going wrong here. Just as a side note the SMTPDebug isn't outputting either which doesn't help resolve this issue. Of course I've changed the password and the hosts to examples but I can assure you that the emails are being sent successfully but for some odd reason it's sending two copies.</p>
  
  <pre><code>&lt;?php    
  
      require("php/PHPMailer.php");
      require("php/SMTP.php");
      use PHPMailer\PHPMailer\PHPMailer;  
  
      $mail = new PHPMailer(true); 
  
      $mail-&gt;SMTPDebug = 2;
      $mail-&gt;isSMTP();
      $mail-&gt;Host = 'mail.example.com;';
      $mail-&gt;SMTPAuth = true;
      $mail-&gt;Username = 'info@example.com';
      $mail-&gt;Password = 'emailClientPass';
      $mail-&gt;SMTPSecure = 'ssl';
      $mail-&gt;Port = 465;
  
      $mail-&gt;setFrom('info@example.com', 'Info');
      $mail-&gt;addAddress('emailto@gmail.com', 'Email To Name');
      $mail-&gt;addReplyTo('info@example.com', 'Info');
  
      $mail-&gt;isHTML(true);
      $mail-&gt;Subject = 'Email Subject'.rand();;
      $mail-&gt;Body    = 'Email Body';
      $mail-&gt;AltBody = 'Email Body 2';
  
      $mail-&gt;send();
  
      if(!$mail-&gt;Send()) {
          echo 'Email Failed To Send.'; 
      } 
      else {
          echo 'Email Was Successfully Sent.'; 
      }
  
  ?&gt;
  </code></pre>