Questo è il codice ma non funzionante. Continua per 5 minuti a caricare alla fine si blocca senza presentare niente nella pagina.

Codice PHP:
<?php


require("class.phpmailer.php");  
  
$mail = new PHPMailer();  
  
$mail->From     "xxx@pec.luclapec.com";  

$mail->Mailer   "smtp";
$mail->Host     "smtps.pec.aruba.it"// SMTP server  
$mail->Port 465;
// $mail->SMTPSecure = 'tls';

$mail->Timeout'120';

$mail->SMTPAuth true// turn on SMTP authentication
$mail->Username "xxx@pec.luclapec.com"// SMTP username
$mail->Password "xxx"// SMTP password
   
 
$mail->AddAddress("destinatario@email.it");  
  
$mail->Subject  "First PHPMailer Message";  
$mail->Body     "Hi! This is my first e-mail sent through PHPMailer.";  

if(!
$mail->Send()) {  
  echo 
'Message was not sent.';  
  echo 
'Mailer error: ' $mail->ErrorInfo;  
} else {  
  echo 
'Message has been sent.';  
}

?>