From ebab4fe179517b3deeb8e13dbac30e588ac27288 Mon Sep 17 00:00:00 2001 From: didier Date: Mon, 21 Oct 2024 08:13:28 +0200 Subject: [PATCH] fix secure mail send --- app/Console/Commands/SendNotifications.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/SendNotifications.php b/app/Console/Commands/SendNotifications.php index 00d35b1e..c1c8d275 100644 --- a/app/Console/Commands/SendNotifications.php +++ b/app/Console/Commands/SendNotifications.php @@ -66,7 +66,9 @@ public function handle() $mail->SMTPAuth = env('MAIL_AUTH'); // Enable SMTP authentication $mail->Username = env('MAIL_USERNAME'); // SMTP username $mail->Password = env('MAIL_PASSWORD'); // SMTP password - $mail->SMTPSecure = env('MAIL_SMTPSECURE'); // Enable TLS encryption, `ssl` also accepted + $mail->SMTPSecure = env('MAIL_SMTPSECURE',false); // Enable TLS encryption, `ssl` also accepted + if ($mail->SMTPSecure==false) + $mail->SMTPAutoTLS=false; $mail->Port = env('MAIL_PORT'); // TCP port to connect to // Loop on all users