if(isset($_POST['Submit']))
non invii 'submit'
if(isset($_POST['messaggio']))

prova anche l'invio e il recupero con GET