{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\lang1040\f0\fs20 \par
ob_start();\par
if(isset($_POST['btnSubmit']))\par
\{\par
require("class.phpmailer.php");\par
$mail = new PHPMailer();\par
//Your SMTP servers details\par
\par
$mail->IsSMTP(); // set mailer to use SMTP\par
$mail->Host = "smtp.tiscali.it"; // specify main and backup server or localhost\par
$mail->SMTPAuth = true; // turn on SMTP authentication\par
$mail->Username = "xxxxx.xxxxx@tiscali.it"; // SMTP username\par
$mail->Password = "xxxxx"; // SMTP password\par
//It should be same as that of the SMTP user\par
//$redirect_url = "http://".$_SERVER['SERVER_NAME']; //Redirect URL after submit the form\par
$redirect_url = "messaggio_inviato.htm"; //Redirect URL after submit the form\par
\par
$mail->From = $mail->Username;\tab //Default From email same as smtp user\par
$mail->FromName = "xxxxxxxxx";\par
$mail->AddAddress("xxxxx.xxxxx@tiscali.it", "xxxxx"); //Email address where you wish to receive/collect those emails.\par
\par
$mail->WordWrap = 50; // set word wrap to 50 characters\par
$mail->IsHTML(true); // set email format to HTML\par
\par
$mail->Subject = $_POST['subject'];\par
$message = "Richiesta :".$_POST['Richiesta']. "\\r\\n
Nome e Cognome/Azienda :".$_POST['Nome_e_Cognome_Azienda']." \\r\\n
Indirizzo :".$_POST['Indirizzo']." \\r\\n
Citt\'e0 :".$_POST['Citta']." \\r\\n
\tab CAP :".$_POST['CAP']." \\r\\n
Nazione :".$_POST['Nazione']." \\r\\n
Telefono :".$_POST['Telefono']. " \\r\\n
\tab Fax :".$_POST['Fax']. " \\r\\n
\tab Contattatemi via :".$_POST['Contattatemi_via']. " \\r\\n
Privacy :".$_POST['Accetto_norme_privacy']. " \\r\\n
Email: ".$_POST[Email]."
:".$_POST[''];\par
$mail->Body = $message;\tab\tab\par
\par
if(!$mail->Send())\par
\{\par
echo "Message could not be sent.
";\par echo "Mailer Error: " . $mail->ErrorInfo;\par exit;\par \}\par echo "Message has been sent";\par header("Location: $redirect_url");\par \}\par ?>\par \par }