Ecco ho fatto la modifica
Codice PHP:
<?php
###############################
# INIZIO CONFIGURAZIONE #
###############################
//email del destinatario del modulo
$destinatario = "xxx@xxxxx.com";
//nome mittente per la corretta intestazione del modulo
$nome_mittente = "$Cognome_Nome";
//email mittente per per la corretta intestazione del modulo
$email_mittente = "$email";
//oggetto dell'email
$subject = "FORM CONTATTI";
//url della pagina di ringraziamento
$pagina_grazie = "http://www...............html";
//orario e data
$ora = date ("H:i:s");
$data = date ("d/m/Y");
$from = "From: $nome_mittente <$email_mittente>\n";
$from .= "CC: $destinatario\n";
$from .= "MIME-Version: 1.0\n";
$from .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
$from .= "Content-Transfer-Encoding: 7bit\n\n";
//intestazione dell'email (arriva al destinatario)
$corpo = "Di seguito i dati inviati il $data alle ore $ora
---------------------------------------------------------------------------\n\n";
#############################
# FINE CONFIGURAZIONE #
#############################
//============================================================\
########### CODICE VARIO ###########
//variabili per rendere lo script compatibile anche con PHP 4.2 - copyright di Chris
if(!isset($_SERVER) OR !$_SERVER OR !is_array($_SERVER) OR count(array_diff($_SERVER, $HTTP_SERVER_VARS))){
$_POST = &$HTTP_POST_VARS;
}
//prendo il numero IP
if(isset($_SERVER["HTTP_X_FORWARDED_FOR"])){
if ($_SERVER["HTTP_X_FORWARDED_FOR"] == "") {
$ipnumb = getenv("REMOTE_ADDR");
}else {
$ipnumb = getenv("HTTP_X_FORWARDED_FOR");
}
} else {
$ipnumb = getenv("REMOTE_ADDR");
}
// costruiamo le intestazioni specifiche per il formato HTML
foreach($_POST as $key => $valore){
$key = ucfirst(stripslashes(trim($key)));
$valore = stripslashes(trim($valore));
$key = str_replace("_"," ",$key);
if(trim($valore) == "") $valore = "--- non compilato ---";
$corpo .= "<html><body>".$key .": ". $valore ."\n\n";
}
$corpo .= "Numero IP: $ipnumb"."\n";
$corpo .= "---------------------------------------------------------------------------\n\n";
$corpo .= "</body></html>";
//inizio l'invio dell'email
mail("$destinatario","$subject","$corpo","$from");
header ("Location: $pagina_grazie");
?>
Non l'ho testato, ma dovrebbe funzionare