the code to send the email is at lines 48 - 135. the code that stores the order summary and sets the session is at lines 207- 267
to fix the problem, move the code to send the email to line 268 so it is sent after the session is created.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.