the code to send the email is at line 423 - 510, this is before the code to store the order summary which creates the order number. The order summary code start at line 51.
at line 625 - 630 isthe following code block:
<?php
if ($eCart1->IsEmpty()) {
$eCart1->redirStr = "cart.php";
$eCart1->cartAction = "RedirectIfEmpty";
}
?>
move the email code block from line 423 - 510 to be just before that code block