The repeated code on the success page is because of the code I had you add for debugging: var_dump($_SESSION);
Remove that from the success page.
The content of the email is controlled with a separate page. It looks like you added an "updatable" cart to that page and you should have added a "email friendly" cart. The email friendly cart will put the styles inline so that it shows up correctly when sent via email.