شكرا لك تم حل المشكلة تحياتى لحضرتك
0
بعد التعديل على الكود والتاكد ان كل شى على ما يرام يظهر هذا الخطا 2024-05-18 22:44:43 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP ffacd0b85a97d-354bae5ef22sm2604403f8f.67 - gsmtp 2024-05-18 22:44:43 CLIENT -> SERVER: EHLO localhost 2024-05-18 22:44:43 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [197.59.91.87]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250 SMTPUTF8 2024-05-18 22:44:43 CLIENT -> SERVER: STARTTLS 2024-05-18 22:44:43 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS SMTP Error: Could not connect to SMTP host. 2024-05-18 22:44:43 CLIENT -> SERVER: QUIT 2024-05-18 22:44:43 2024-05-18 22:44:43 SMTP
تظهر هذه المشكلة Fatal error : Uncaught PHPMailer\PHPMailer\Exception: SMTP Error: Could not connect to SMTP host. Failed to connect to server in C:\Program Files\Ampps\www\api-server\PHPMailer\src\PHPMailer.php:2282 Stack trace: #0 C:\Program Files\Ampps\www\api-server\PHPMailer\src\PHPMailer.php(2058): PHPMailer\PHPMailer\PHPMailer->smtpConnect() #1 C:\Program Files\Ampps\www\api-server\PHPMailer\src\PHPMailer.php(1687): PHPMailer\PHPMailer\PHPMailer->smtpSend() #2 C:\Program Files\Ampps\www\api-server\PHPMailer\src\PHPMailer.php(1521): PHPMailer\PHPMailer\PHPMailer->postSend() #3 C:\Program Files\Ampps\www\api-server\index.php(27): PHPMailer\PHPMailer\PHPMailer->send() #4 {main} thrown in C:\Program Files\Ampps\www\api-server\PHPMailer\src\PHPMailer.php on line 2282