ciao a tutti ho questo script per l'invio di mail da sito web, l'ho uppato in altervista, mi collego all'URL del mio sito e compilo i moduli di mail.html poi premo invio e subentra mail.php però qui la pagina rimane bianca nn da nessuna conferma niente e la mail nn arriva
come posso fare?
grazie
Codice HTML:<html> <head> <title>Contattaci</title> </head> <body> <form action="mail.php" method="POST"> <table border="0"> <tr> <td>Nome</td> <td><input type="text" name="nome" size="30"></td> </tr> <tr> <td>Email</td> <td><input type="text" name="mail" size="30"></td> </tr> <td valign="top">Messaggio</td> <td><textarea rows="10" name="note" cols="40"></textarea></td> </tr> <tr> <td colspan="2" valign="bottom" align="center" height="30"> <input type="submit" value="Invia"> <input type="reset" value="Cancella"></td> </tr> </table> </form> </body> </html>Codice PHP:<?php
//L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
$to = "******@******.it";
//IL SOGGETTO DELLA MAIL
$subject = "Invio Form WEB";
//CORPO DEL MESSAGGIO
$body = "Nome = " . @filter_var($_POST['nome'], FILTER_SANITIZE_STRING);
$body .= "\nEmail = " . @filter_var($_POST['mail'], FILTER_SANITIZE_STRING);
$body .= "\nMessaggio:\n__________\n" . @filter_var($_POST['note'], FILTER_SANITIZE_STRING);
//INTESTAZIONI SUPPLEMENTARI
$headers = "From: Contattaci - Sito WEB";
//INVIO
if(mail($to, $subject, $body, $headers)) { // SE L'INOLTRO È ANDATO A BUON FINE...
echo "mail inviata!!";
echo "<meta http-equiv=\"refresh\" content=\"5;url=mail.html\" />";
} else {// ALTRIMENTI...
echo "Si sono verificati dei problemi nell'invio della mail,ci scusiamo,riprovate pù tardi";
}
?>

LinkBack URL
About LinkBacks
