[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
This commit is contained in:
Andre Johnson 2020-10-12 15:29:07 +02:00
parent 6844cb8685
commit 7ab772eeea
No known key found for this signature in database
GPG Key ID: B51674852F912425

View File

@ -158,6 +158,7 @@ class MailjetApiTransport extends AbstractApiTransport
'Base64Content' => $attachment->bodyToString(),
];
if ('inline' === $headers->getHeaderBody('Content-Disposition')) {
$formattedAttachment['ContentID'] = $headers->getHeaderParameter('Content-Disposition', 'name');
$inlines[] = $formattedAttachment;
} else {
$attachments[] = $formattedAttachment;