scusate, manca l'ultima parte del codice, l'aggiungo qui sotto

codice:
//CHIUSURA CONNESSIONE
	$messaggio->SmtpClose();
	unset($messaggio);
}