Commit 41b5bbaa authored by Fabian Galinski's avatar Fabian Galinski 😾
Browse files

[BUGFIX] Single attachements are sent twice in the mail

parent ff0a1e84
......@@ -401,19 +401,9 @@ class MailTemplateService {
* @param FileReference $file
*
* @return MailTemplateService
* @throws \TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException
*/
public function addFileResourceAttachment(FileReference $file): MailTemplateService {
$originalResource = $file->getOriginalResource();
if (!$originalResource) {
return $this;
}
$this->markers[] = $file;
/** @noinspection PhpParamsInspection */
$this->addAttachment(
$originalResource->getContents(), $originalResource->getName(), $originalResource->getMimeType()
);
return $this;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment