To troubleshoot, remove the redirect from UE, change:
$GoToPage = "thank-you.html"
$GoToPage = ""
add the following code at line 1 to turn on error reporting:
Then add the following code in the body tag:
<?php @session_start(); var_dump($_SESSION); ?>
this will write the session contents to the page including the email message, send a link where i can test the email after making those changes.