prova a guardare il sorgente html del file che ti viene generato una volta inviato il modulo, c'è un errore di apici javascript.
Quando vai a stampare questa
Codice PHP:
echo "<body onLoad='alert('Your e-mail has been sent.')'>"
diventa
codice:
<body onLoad='alert('Your e-email has been sent.')'