title: PHPMailer Send() function is stopping a script after executing
body: <p>I am using PHPMailer to send a user the results of a form using the following steps:</p>
  
  <pre><code>    $mail = new PHPMailer(); // create a new object
      $mail-&gt;IsSMTP(); // enable SMTP
      $mail-&gt;SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
      $mail-&gt;SMTPAuth = true; // authentication enabled
      $mail-&gt;SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
      $mail-&gt;Host = "smtp.gmail.com";
      $mail-&gt;Port = 465; // or 587
      $mail-&gt;IsHTML(true);
      $mail-&gt;Username = "user@example.com";
      $mail-&gt;Password = "passwd";
      $mail-&gt;SetFrom("user@example.com");
      $mail-&gt;Subject = "Test";
      $mail-&gt;Body = mailMaker($data);
      $mail-&gt;IsHTML(true);
      $mail-&gt;AddAddress("otheruser@example.com");
      $mail-&gt;Send();
  </code></pre>
  
  <p>This is a part of a larger <code>.php</code> document which is called by ajax and returns the form data back to the page. </p>
  
  <p>When the <code>$mail-&gt;Send()</code> function is called the email is sent and everything works fine, but the script ends and I don't get the data back during ajax. I know it is this line because if I comment it out everything works (except the mail isn't sent obviously).</p>
  
  <p>I tried moving the mail methods to another script but I kept getting errors, and was unable to even get a <code>var_dump()</code> or anything returned from the ajax. Is there a logical reason <code>Send()</code> is stopping the script in this case?</p>