Wrap the code like so:
[code=php]Code goes here[/code]
As to your problem, your email contains undefined variables. For instance you define namefield as $nameField = $_POST['name']; but in the email you send, you have the undefined variable $name instead of the defined $nameField.
Lost time is never found again.
- Benjamin Franklin