Adesso lo corretto però non funziona lo stesso..
![]()
![]()
![]()
<?php
// L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
$to = "tecnicorocco@tiscali.it";
// IL SOGGETTO DELLA MAIL
$subject = "Informazioni dal Sito";
// COSTRUIAMO IL CORPO DEL MESSAGGIO
$body = "Contenuto del modulo:\n\n";
$body .= "Nome: " . trim(stripslashes($_POST["Nome"])) . "\n";
$body .= "Età: " . trim(stripslashes($_POST["Anni"])) . "\n";
$body .= "Città: " . trim(stripslashes($_POST["City"])) . "\n";
$body .= "Indirizzo: " . trim(stripslashes($_POST["Indirizzo"])) . "\n";
$body .= "Note: " . trim(stripslashes($_POST["Note"])) . "\n";
// INTESTAZIONI SUPPLEMENTARI
$headers = "From: Modulo utenti<tecnicorocco@tiscali.it>";
// INVIO DELLA MAIL
if(mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
echo "La mail è stata inoltrata con successo.";
} else {// ALTRIMENTI...
echo "Si sono verificati dei problemi nell'invio della mail.";
}
?>
CONFIGURAZIONE PHP.INI
[mail function]
; For Win32 only.
SMTP = smtp.tiscali.it
; For Win32 only.
sendmail_from = tecnicorocco@tiscali.it
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = DEFAULT_SENDMAIL_PATH
AIUTOOOOOOOOOOOOO