Advertencia: stream_socket_enable_crypto (): esta secuencia no admite SSL / crypto en C: \ xampp \ htdocs \ 12work \ class.smtp.php en la línea 197

Estoy usando XAMPP y cuando intento enviar un correo electrónicolocalhost Me sale la siguiente advertencia:

Advertencia: stream_socket_enable_crypto(): esta secuencia no admite SSL / crypto enC:\xampp\htdocs\12work\class.smtp.php en linea 197

Aquí está mi código:

$mail = new PHPMailer();

$mail->IsSMTP(); // set mailer to use SMTP

$mail->Host = "smtp.gmail.com"; // specify main and backup server

$mail->SMTPAuth = true;
$mail->Port = 25;

$mail->SMTPSecure = "tls";

$mail->SMTPAuth = true; // turn on SMTP authentication

$mail->Username = "[email protected]"; // SMTP username

$mail->Password = "mypassword"; // SMTP password

$mail->From = "[email protected]"; //do NOT fake header.

$mail->FromName = "MailMan";

$mail->AddAddress("[email protected]"); // Email on which you want to send mail

$mail->IsHTML(true);

$mail->Subject = "Just a Test";

$mail->Body = "Hello. I am testing <b>PHP Mailer.</b>";

if(!$mail->Send())

{

echo $mail->ErrorInfo;

}else{

echo "email was sent";

}

Respuestas a la pregunta(3)

Su respuesta a la pregunta