the action of the form is to post to the thank you page:
<form name="form1" id="form1" method="post" action="thankYou.php">
rule #1 when working with forms:
All Form Processing MUST happen on the action page.
Since the action is to post to the thank you page, the behavior on the survey page to send the email is never triggered.
in order to trigger the behavior on the survey page to send the email, the action of the form needs to be changed to post to the survey page:
<form name="form1" id="form1" method="post" action="survey.php">