Problema para enviar correo electronico utilizando phpMailer
este es mi codigo
Código PHP:
Ver original$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->IsSMTP();
$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 = "micuenta"; // GMAIL username
$mail->Password = "mipassword"; // GMAIL password
$mail->FromName = "Mr.Weerachai Nukitram"; // set from Name
$mail->Subject = "Test sending mail.";
$mail->Body = "My Body & <b>My Description</b>";
$mail->set('X-Priority', '1'); //Priority 1 = High, 3 = Normal, 5 = low
$mail->Send();
este es el error que estoy obteniendo
SMTP -> ERROR: Failed to connect to server: Connection refused (111)
que estoy haciendo mal?