title: ASP - Page Not Loading until SendEmail function has ran
body: <p>I have an ASP page that receives data from the previous page through a form.</p>
  
  <p>The ASP page:</p>
  
  <ol>
  <li>Connects to Database</li>
  <li>Updates Database</li>
  <li>Loads HTML to say your form has been submitted</li>
  <li>Email routine that sends a confirmation.</li>
  </ol>
  
  <p>However, the page is not loading until the email routine has ran, even though it's the last routine to be called.</p>
  
  <p>The call "SendEmail" routine, which is at the bottom of the page in a Sub, is called right after the HTML is loaded</p>
  
  <pre><code>&lt;/html&gt;
  
  &lt;%
  
  Call SendEmail
  
  Sub SendEmail
  
  End Sub
  %&gt;
  </code></pre>
  
  <p>Any help will be much appreciated.</p>
  
  <p>Cheers</p>
  
  <p>John</p>