Dovresti scrivere un cosa del genere:

mail("indirizzo", "oggetto", echo "$testo"