<?php
$address2="Richiesta informazioni dal tuo sito";
$e="tuonome@tuodominio.com";
$msg="messaggio";

$ogg="Ogetto"; /*Inserire l'oggetto dell'email da spedire*/
$mittente="$email"; /*Inserire l'indirizzo email che verrà visulaizzato come mittente dell'email*/
$reply="$email"; /*Inserire l'indirizzo email a cui verranno inviate le risposte all'email inviata*/

$intestazioni = "From: $mittente\nReply-To: $reply\nX-Mailer: Sismail Web Email Interface\nMIME-version: 1.0\nContent-type: multipart/mixed;\n boundary=\"Message-Boundary\"\nContent-transfer-encoding: 7BIT\nX-attachments: $titolo";

$body_top = "--Message-Boundary\n";
$body_top .= "Content-type: text/html; charset=iso-8859-1\n";
$body_top .= "Content-transfer-encoding: 7BIT\n";
$body_top .= "Content-description: Mail message body\n\n";

$msg_body = $body_top . $msg;


$msg_body .= "\n\n--Message-Boundary\n";
//$msg_body .= "Content-type: $filetype; name=\"$titolo\"\n";
//$msg_body .= "Content-Transfer-Encoding: BASE64\n";
//$msg_body .= "Content-disposition: attachment; filename=\"$titolo\"\n\n";
//$msg_body .= "$encoded_attach\n";
//$msg_body .= "--Message-Boundary--\n";

if(!(@mail($e,$ogg,$msg_body, $intestazioni))){
print "<H5>Invio della email fallito.</H5>";}
else {
echo"Grazie $nome, l'email è stata inviata con successo! Ti risponderemo il più presto possibile.

";
}
?>