[Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent.
This commit is contained in:
parent
3a51e0143a
commit
7b1bbb6190
@ -79,10 +79,14 @@ class MandrillTransport extends AbstractApiTransport
|
|||||||
'type' => $headers->get('Content-Type')->getBody(),
|
'type' => $headers->get('Content-Type')->getBody(),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($name = $headers->getHeaderParameter('Content-Disposition', 'name')) {
|
||||||
|
$att['name'] = $name;
|
||||||
|
}
|
||||||
|
|
||||||
if ('inline' === $disposition) {
|
if ('inline' === $disposition) {
|
||||||
$payload['images'][] = $att;
|
$payload['message']['images'][] = $att;
|
||||||
} else {
|
} else {
|
||||||
$payload['attachments'][] = $att;
|
$payload['message']['attachments'][] = $att;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user