", $emailBody); // send the email mail($to, $emailSubject, $emailBodyHTML, implode("\r\n", $headers)); // if subscribe add to mailing list if(!empty($subscribe)) { // process } // redirect to the 'thank you' page header("Location: /thank-you/index.html"); } ?>