lucy24 - 11:26 am on Dec 11, 2013 (gmt 0)
You can keep the <html><body> et cetera if you make a page to go with it.
if (long string of conditions covering all the things that can go wrong with user input such as malformed e-mail address, missing text et cetera)
echo (wide array of messages telling human user they did something wrong)
else (pretty thank-you text)
and then the rest of your every-page boilerplate winding up with </body></html>