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
diventaCodice PHP:
echo "<body onLoad='alert('Your e-mail has been sent.')'>";
codice:<body onLoad='alert('Your e-email has been sent.')'