Salve

Devo fare uno script di invio Mail

Ho provato SwiftMailer, la funziona PHP Mail(), ad aggiungere il fake SENDMAIL per windows ed ad utilizzare PHPMAILER

questo č il codice
[/PHP]
<?php
session_start();
require_once('../phpmailer/class.phpmailer.php');
require_once('../phpmailer/class.smtp.php');

$title='Sito Ufficiale';
$cognome=$_POST['cognome'];
$nome=$_POST['nome'];
$email=$_POST['email'];
?>
<?php
$mail->IsSMTP(true);
$mail->Host = "smtp.gmail.com";
$mail->Port = 587;
$mail->SMTPSecure = "tls";

$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = 'danjelupo@gmail.com'; // SMTP username
$mail->Password = '########';// SMTP password

$mail->SetFrom($email, 'First Last');
$mail->AddReplyTo("omeromusical@gmail.com","First Last");
$mail->Subject = "PHPMailer Test Subject via smtp (Gmail), basic";
// optional, comment out and test
$mail->IsHTML(true); // send as HTML
$mail->Subject = "This is the subject";
$mail->Body = "Hi,This is the HTML BODY "; //HTML Body
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$address = "omeromusical@gmail.com";
$mail->AddAddress($address, "First Last");


if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
}else {
echo "Message sent!";
}
?> [/PHP]

La Cosa che non capisco č che mi restituisce la pagina bianca senza dirmi ne se l'ha inviato nč se non l'ha fatto. So che non lo invia perchč in GMAil non mi arriva nulla..