Ecco il codice. Mi arriva l'email ma si apre una pagina vuota.
Codice PHP:
<?php $headers = $_POST ['email']; $nome = $_POST ['nome']; $cognome = $_POST ['cognome']; $citta = $_POST ['citta']; $tel = $_POST ['tel']; $email = $_POST ['email']; $textarea = $_POST ['textarea']; $checkbox = $_POST ['checkbox']; $to = 'miaemail@mail.it'; $contenuto = "Nome: " . $nome . "\r\n" . "Cognome: " . $cognome . "\r\n" . "Città: " . $citta . "\r\n" . "Telefono: " . $tel . "\r\n" . "Email: " . $email . "\r\n" . "Privacy: " . $checkbox . "\r\n" . "Messaggio: " . $textarea; $success = mail( $to, $headers, $contenuto ); if ($success) { header("Location: http://www.pagina.html"); } else { echo "KO"; } ?>