Skip to content

Commit 93174e2

Browse files
authored
feat: Add support for inline attachments (#56598)
1 parent 59c0cec commit 93174e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Illuminate/Mail/Transport/ResendTransport.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function doSend(SentMessage $message): void
7373
foreach ($email->getAttachments() as $attachment) {
7474
$attachmentHeaders = $attachment->getPreparedHeaders();
7575
$contentType = $attachmentHeaders->get('Content-Type')->getBody();
76-
76+
$disposition = $attachmentHeaders->getHeaderBody('Content-Disposition');
7777
$filename = $attachmentHeaders->getHeaderParameter('Content-Disposition', 'filename');
7878

7979
if ($contentType == 'text/calendar') {
@@ -88,6 +88,10 @@ protected function doSend(SentMessage $message): void
8888
'filename' => $filename,
8989
];
9090

91+
if ($disposition === 'inline') {
92+
$item['inline_content_id'] = $attachment->hasContentId() ? $attachment->getContentId() : $filename;
93+
}
94+
9195
$attachments[] = $item;
9296
}
9397
}

0 commit comments

Comments
 (0)