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 949e256 commit 33ee665Copy full SHA for 33ee665
src/Bundle/Sender/Adapter/SwiftMailerAdapter.php
@@ -64,9 +64,11 @@ public function send(
64
65
$message->setBody($renderedEmail->getBody(), 'text/html');
66
67
- foreach ($attachments as $attachment) {
68
- $file = \Swift_Attachment::fromPath($attachment);
69
-
+ foreach ($attachments as $attachmentFilename => $attachmentPath) {
+ $file = \Swift_Attachment::fromPath($attachmentPath);
+ if (!is_numeric($attachmentFilename)) {
70
+ $file->setFilename($attachmentFilename);
71
+ }
72
$message->attach($file);
73
}
74
0 commit comments