Ma se io avessi un codice come questo:
<?php
$headers .= "Content-Type: text/html; charset= iso-8859-1\n\n";
$dachinome=trim(stripslashes($_POST["nome"]));
$dachiemail="<".trim(stripslashes($_POST["mail"])).">";
$headers .= "From: $dachinome $dachiemail\r\n";
$to ="prova@prova.net";
$subject ="Subject di prova";
$body = "
Dati dell'utente:\n\n
";
$body .= "Nome: " . trim(stripslashes($_POST["nome"])) . "
\n";
$body .= "Cognome: " . trim(stripslashes($_POST["cognome"])) . "
\n";
$body .= "Via: " . trim(stripslashes($_POST["via"])) . "
\n";
$body .= "C.A.P.: " . trim(stripslashes($_POST["cap"])) . "
\n";
$body .= "CIttà: " . trim(stripslashes($_POST["citta"])) . "
\n";
$body .= "Tel.: " . trim(stripslashes($_POST["tel"])) . "
\n";
$body .= "E-mail: " . trim(stripslashes($_POST["mail"])) . "
\n";
$body .= "Data di nascita: " . trim(stripslashes($_POST["data"])) . "
\n";
$body .= "Società sportiva: " . trim(stripslashes($_POST["ass_sport"])) . "
\n";
$body .= "N° tessera: " . trim(stripslashes($_POST["num_tessera"])) . "
\n";
$body .= "Taglia maglia: " . trim(stripslashes($_POST["taglia"])) . "
\n";
$body .= "Ricordiamo a coloro che non fossero tesserati di inviare via fax il certificato medico di sana e robusta costituzione al numero 02/123456789\n";
if (@mail($to, $subject, $body, $headers))
{
echo "la mail è stata inviata correttamente";
$headers = "Content-Type: text/html; charset= iso-8859-1\n\n";
$headers .= "From: Miosito.net <prova@prova.net>\r\n";
mail($_POST["mail"],$subject, $body, $headers);
}
?>