Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e348513

Browse filesBrowse files
committed
bug #35173 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API (vilius-g)
This PR was merged into the 4.3 branch. Discussion ---------- [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | 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 also adds previously missing attachment names. Commits ------- 7b1bbb6 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
2 parents 08670cc + 7b1bbb6 commit e348513
Copy full SHA for e348513

File tree

1 file changed

+6
-2
lines changed
Filter options

1 file changed

+6
-2
lines changed

‎src/Symfony/Component/Mailer/Bridge/Mailchimp/Http/Api/MandrillTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Mailchimp/Http/Api/MandrillTransport.php
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,14 @@ private function getPayload(Email $email, SmtpEnvelope $envelope): array
7979
'type' => $headers->get('Content-Type')->getBody(),
8080
];
8181

82+
if ($name = $headers->getHeaderParameter('Content-Disposition', 'name')) {
83+
$att['name'] = $name;
84+
}
85+
8286
if ('inline' === $disposition) {
83-
$payload['images'][] = $att;
87+
$payload['message']['images'][] = $att;
8488
} else {
85-
$payload['attachments'][] = $att;
89+
$payload['message']['attachments'][] = $att;
8690
}
8791
}
8892

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.