Salve a tutti.
In un form che, una volta compilato, scrive tutto su un DB, vorrei che insieme inviasse ad un indirizzo definito una mail con una "sintesi" del form inviato.
Per far questo, subito dopo le stringhe per l'INSERT nel DB, ho inserito questo codice:
Codice PHP:
<?
$nome=$_POST ['nome'] ;
$citta=$_POST ['citta'] ;
$indirizzo=$_POST ['indirizzo'] ;
$telefono=$_POST ['telefono'] ;
$email=$_POST ['email'] ;
$richiesta=$_POST ['richiesta'] ;
$mail= "xxxxxxxx@xxxxxxx.com" ;
$subject = "informazioni";
$body = "Contenuto del modulo:\n\n"; $body .= "Nome cognome: " . trim(stripslashes($_POST["nome"])) . "\n"; $body .= "citta: " . trim(stripslashes($_POST["citta"])) . "\n"; $body .= "telefono: " . trim(stripslashes($_POST["telefono"])) . "\n"; $body .= "email: " . trim(stripslashes($_POST["email"])) . "\n"; $body .= "Indirizzo: " . trim(stripslashes($_POST["indirizzo"])) . "\n"; $body .= "Richiesta: " . trim(stripslashes($_POST["richiesta"])) . "\n";
mail("$mail","$subject","$body");
?>
che però pare non funzionare, perchè alla casella di posta indicata, non arriva nulla.
Qualche errore in particolare ritrovate nello script?
Qualche suggerimento?
Grazie a tutti.