We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac1af41 commit 8d46ad4Copy full SHA for 8d46ad4
src/Bundle/Sender/Adapter/SwiftMailerAdapter.php
@@ -55,9 +55,11 @@ public function send(
55
56
$message->setBody($renderedEmail->getBody(), 'text/html');
57
58
- foreach ($attachments as $attachment) {
59
- $file = \Swift_Attachment::fromPath($attachment);
60
-
+ foreach ($attachments as $attachmentFilename => $attachmentPath) {
+ $file = \Swift_Attachment::fromPath($attachmentPath);
+ if (!is_numeric($attachmentFilename)) {
61
+ $file->setFilename($attachmentFilename);
62
+ }
63
$message->attach($file);
64
}
65
0 commit comments