semplicemente con un file .php che ho messo sul server e che ho legato al form, non ho utilizzato nessun altro sistema.
il body del file.php è il seguente:
codice:
<?php
// INDIRIZZO DEL DESTINATARIO DELLA MAIL
$to = "mia@email.com";
// OGGETTO DELLA MAIL
$subject = "Oggetto";
// COSTRUZIONE DEL CORPO DEL MESSAGGIO
$body = "Contenuto del modulo:\n\n";
$body .= "nome: " . trim(stripslashes($_POST["nome"])) . "\n";
$body .= "cognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
$body .= "email: " . trim(stripslashes($_POST["email"])) . "\n";
$body .= "telefono: " . trim(stripslashes($_POST["telefono"])) . "\n";
$body .= "entrydate: " . trim(stripslashes($_POST["entrydate"])) . "\n";
$body .= "goingoutdate: " . trim(stripslashes($_POST["goingoutdate"])) . "\n";
$body .= "scrivici: " . trim(stripslashes($_POST["scrivici"])) . "\n";
// INTESTAZIONI SUPPLEMENTARI
$headers = "From: Reservation";
// INVIO DELLA MAIL
if(@mail($to, $subject, $body, $headers)) {
echo "Your email has been sent correctly. Thank you!";
} else {
echo "There was a problem while sending the mail. Please contact us. Thank you!";
}
?>
Sbaglio in qualcosa??