From 6c9e29f1e47ed55482df523643d6e806a7403b9f Mon Sep 17 00:00:00 2001 From: Nikola Markovic Date: Thu, 26 Dec 2024 22:40:04 +0100 Subject: [PATCH] 11.x improve resend transport response handling - fix (#54006) * [11.x] Improve Resend transport response handling * [11.x] Fix/Improve Resend transport response handling - adjusted throw_if condition --- src/Illuminate/Mail/Transport/ResendTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Mail/Transport/ResendTransport.php b/src/Illuminate/Mail/Transport/ResendTransport.php index c5576d7cebfc..0e690bf30b5a 100644 --- a/src/Illuminate/Mail/Transport/ResendTransport.php +++ b/src/Illuminate/Mail/Transport/ResendTransport.php @@ -99,7 +99,7 @@ protected function doSend(SentMessage $message): void 'attachments' => $attachments, ]); - throw_if($result['statusCode'] != Response::HTTP_OK, Exception::class, $result['message']); + throw_if(isset($result['statusCode']) && $result['statusCode'] != Response::HTTP_OK, Exception::class, $result['message']); } catch (Exception $exception) { throw new TransportException( sprintf('Request to Resend API failed. Reason: %s.', $exception->getMessage()),