в чем причина такой ошибки?
учусь делать сайт, делаю рассылку через форму на сайте. Застряла с этим и не могу продвинуться дальше. Как можно решить эту ошибку? ... Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [C:\xampp\htdocs\honey\amministrazione\PHPMailer\src\SMTP.php line 468] SMTP Error: Could not connect to SMTP host. . весь код не удается отправить так как выдает ошибку, что спам
$mail->SMTPDebug = 3;
//Set PHPMailer to use SMTP.
$mail->isSMTP();
//Set SMTP host name
$mail->Host = "smtp.gmail.com";
//Set this to true if SMTP host requires authentication to send email
$mail->SMTPAuth = true;
//If SMTP requires TLS encryption then set it
$mail->SMTPSecure = "tls";
//Set TCP port to connect to
$mail->Port = 25;
//CharSet
$mail->CharSet = 'UTF-8';
//Provide username and password
$mail->Username = "[email protected]";
$mail->Password = "pass";
//From
$mail->setFrom('[email protected]');
$mail->FromName = "S N";
//Reply
$mail->addReplyTo("[email protected]", "Reply");
while ($row = mysqli_fetch_assoc($result))
{
$array[] = $row['email'];
}
foreach($array as $news_mail){
$mail->addBCC($news_mail);
}
$mail->Subject = "news";
$mail->Body = "name";
//Send HTML or Plain Text
$mail->isHTML(true);
try {
$mail->send();
echo "Message has been sent successfully";
} catch (Exception $e) {
echo "Mailer Error: " . $mail->ErrorInfo;
print_r(error_get_last());
}