prova ad usare phpmailer, a me ha risolto tutti i problemi...