Ciao a tutti, sto cercando di utilizzare su un server dedicato uno script php per l'invio di mail che funziona correttamente su altri server; nel dettaglio utilizzo l'invio tramite l'SMTP autenticato di google ma su questo server ottengo l'errore:

SMTP -> ERROR: Failed to connect to server: (0)
Error:

SMTP Error: Could not connect to SMTP host.


nel dettaglio lo script ha:

$mail->SMTPDebug = 1; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "xxxxxxxxxx"; // GMAIL username
$mail->Password = "zzzzzzzzz";


Secondo voi quale potrebbe essere il problema???

Grazie