Skip to content

Commit 7ab772e

Browse files
committed
[Mailer] Fix mailjet image embedding
Filename is not enough to embed the image through cid, ContentID field has to be set with the cid identifier used in the HTMLPart
1 parent 6844cb8 commit 7ab772e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetApiTransport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ private function prepareAttachments(Email $email, ?string $html): array
158158
'Base64Content' => $attachment->bodyToString(),
159159
];
160160
if ('inline' === $headers->getHeaderBody('Content-Disposition')) {
161+
$formattedAttachment['ContentID'] = $headers->getHeaderParameter('Content-Disposition', 'name');
161162
$inlines[] = $formattedAttachment;
162163
} else {
163164
$attachments[] = $formattedAttachment;

0 commit comments

Comments
 (0)