8.2.4
E-posta başarıyla gönderildi. localde sıkıntı yok.
http://burakyuksel2023.free.nf/#contact site infinityfreeapp sitesine yüklü. send message tıklayınca result.phpye gidiyor. ama oda hata veriyor.

<?php
$php_version = phpversion();
require 'vendor/autoload.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/phpmailer/phpmailer/src/PHPMailer.php';
require 'vendor/phpmailer/phpmailer/src/Exception.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = $_POST['name'] ? $_POST['name'] : '' ;
$email = $_POST['email'] ? $_POST['email'] : '';
$phone = $_POST['phone'] ? $_POST['phone'] : '';
$message = $_POST['message'] ? $_POST['message'] : '';
$mail = new PHPMailer(true);
try {
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'asker244897@gmail.com';
$mail->Password = 'wovivtrwmfzedsef';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->setFrom($email, $name);
$mail->addAddress('asker244897@gmail.com');
$mail->isHTML(false);
$mail->Subject = 'Yeni iletişim mesajı';
$mail->Body = "Ad & Soyad: $name\nE-posta: $email\nTelefon Numarası: $phone\nMesaj: $message";
if ($mail->send()) {
echo $php_version . "<br>";
echo 'E-posta başarıyla gönderildi.';
} else {
echo 'E-posta gönderilirken bir hata oluştu: ' . $mail->ErrorInfo;
}
} catch (Exception $e) {
echo 'E-posta gönderilirken bir hata oluştu: ' . $e->getMessage();
}
}
?>