From 4cca9c4e23f093477707e544285a6e2167ec645b Mon Sep 17 00:00:00 2001 From: Lucas Michot Date: Wed, 27 Nov 2024 15:53:51 +0100 Subject: [PATCH] Fix Resend transport headers bug --- src/Illuminate/Mail/Transport/ResendTransport.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Mail/Transport/ResendTransport.php b/src/Illuminate/Mail/Transport/ResendTransport.php index 73218c51d9d7..43557fc159cd 100644 --- a/src/Illuminate/Mail/Transport/ResendTransport.php +++ b/src/Illuminate/Mail/Transport/ResendTransport.php @@ -70,12 +70,12 @@ protected function doSend(SentMessage $message): void if ($email->getAttachments()) { foreach ($email->getAttachments() as $attachment) { - $headers = $attachment->getPreparedHeaders(); + $attachmentHeaders = $attachment->getPreparedHeaders(); - $filename = $headers->getHeaderParameter('Content-Disposition', 'filename'); + $filename = $attachmentHeaders->getHeaderParameter('Content-Disposition', 'filename'); $item = [ - 'content_type' => $headers->get('Content-Type')->getBody(), + 'content_type' => $attachmentHeaders->get('Content-Type')->getBody(), 'content' => str_replace("\r\n", '', $attachment->bodyToString()), 'filename' => $filename, ];