Buonasera Alhazred, ho eseguito dei test seguendo il tuo consiglio.
ho settato tutto come segue:
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.gmail.com"; // SMTP server
$mail->SMTPDebug = 0; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "tls"; // sets the prefix to the servier
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 587; // set the SMTP port for the GMAIL server
$mail->Username = "xxx.noreply@gmail.com"; // GMAIL username
$mail->Password = "xxxxxxxxx"; // GMAIL password
$mail->SetFrom($_POST['email'], "some text");
$mail->AddReplyTo($_POST['email'],"some text");
$mail->AddAddress("xxxx.xxx@gmail.com", "fooClient");
//$mail->AddBCC("xxx@xxxxxx.com", "fooAgency");
//Set the subject line
$mail->Subject = 'foo';
$mail->AltBody = 'foo';
$msg .= "<b>DATI DEL MITTENTE</b><br/><hr/>";
$msg .= "Nome e Cognome: ".$_POST['name']."<br/><br/>";
$msg .= "Email: ".$_POST['email']."<br/><br/>";
$msg .= "Telefono: ".$_POST['phone']."<br/><br/><br/><br/>";
$msg .= "<b>MESSAGGIO</b><br/><hr/><br/>".$_POST['message']."<br/><br/>";
$mail->MsgHTML($msg);
il problema è che le mail mi arrivano comunque tutte dall'indirizzo gmail e non da from che inserisco all'interno del field del form?
Dove sbaglio?