ciao a tutti!

ho dei problemi con php mailer. da quando ho aggiornato all ultima versione non funziona piu...


codice:
  
require("class.phpmailer.php");   
  
$mail = new PHPMailer();   
  
$mail->IsSMTP();  // telling the class to use SMTP   
$mail->Host     = "smtp.XXX.com"; // SMTP server   
$mail->SMTPAuth=true;
$mail->Host = "smtp.XXX.com"; // SMTP server
$mail->Port = "25"; // SMTP server
$mail->Username = "noreply@XXX.com"; // SMTP server
$mail->Password = "XXX"; // SMTP server

$mail->From     = "noreply@XXX.com";   
$mail->AddAddress("sharkyenergy@gmail.com");   
  
$mail->Subject  = "First PHPMailer Message";   
$mail->Body     = "Hi! \n\n This is my first e-mail sent through PHPMailer.";   
$mail->WordWrap = 50;   
  
if(!$mail->Send()) {   
  echo 'Message was not sent.';   
  echo 'Mailer error: ' . $mail->ErrorInfo;   
} else {   
  echo 'Message has been sent.';   
}

ogni votla mi da questo errore:

Message was not sent.Mailer error: SMTP Error: Could not connect to SMTP host.

i dati di autenticazione sono giusti, non reisco a capire cosa causa il problema.. le porte osno aperte...

grazie

ciao

igor