Skip to content

Commit

Permalink
Merge pull request #97 from christophengelmayer/patch-1
Browse files Browse the repository at this point in the history
FEATURE: Adds support for swiftmailer >= v6.0
  • Loading branch information
albe committed Jul 26, 2019
2 parents de85e2c + f79c91b commit 1668ddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Finishers/EmailFinisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ protected function addAttachments(SwiftMailerMessage $mail)
if ($this->parseOption('attachAllPersistentResources')) {
foreach ($formValues as $formValue) {
if ($formValue instanceof PersistentResource) {
$mail->attach(\Swift_Attachment::newInstance(stream_get_contents($formValue->getStream()), $formValue->getFilename(), $formValue->getMediaType()));
$mail->attach(new \Swift_Attachment(stream_get_contents($formValue->getStream()), $formValue->getFilename(), $formValue->getMediaType()));
}
}
}
Expand All @@ -227,7 +227,7 @@ protected function addAttachments(SwiftMailerMessage $mail)
if (!$resource instanceof PersistentResource) {
continue;
}
$mail->attach(\Swift_Attachment::newInstance(stream_get_contents($resource->getStream()), $resource->getFilename(), $resource->getMediaType()));
$mail->attach(new \Swift_Attachment(stream_get_contents($resource->getStream()), $resource->getFilename(), $resource->getMediaType()));
}
}
}
Expand Down

0 comments on commit 1668ddc

Please sign in to comment.