PHPMailler kullanıyorum Yandex Mail üzerinden form verilerini mail olarak göndermeye çalışıyorum kullanıcı adı ve şifrelerin doğru olmasına rağmen sürekli olarak aynı hatayı alıyorum sorunu nasıl çözebilirim?
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
try {
//Server settings
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
$mail->isSMTP();
$mail->Host = 'smtp.yandex.com.tr';
$mail->SMTPAuth = true;
$mail->Username = '********@yandex.com';
$mail->Password = '*************';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->Port = 465;
$mail->setFrom('mail@mail.mail', 'Mailer');
$mail->addAddress('doguazad@pm.me', 'Joe User');
$mail->isHTML(true);
$mail->Subject = 'hi';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}Aldığım Hata :