diff --git a/Classes/Service/MailTemplateService.php b/Classes/Service/MailTemplateService.php index 48ceff74b04e85cd12ef647a2d15c1ae1c0d05ba..1f69ab877233d8a40d7b893004452ce71425ee4d 100644 --- a/Classes/Service/MailTemplateService.php +++ b/Classes/Service/MailTemplateService.php @@ -408,6 +408,20 @@ class MailTemplateService { return $this; } + /** + * Allows adding a file from filePath, + * YOU MUST USE setIgnoreMailQueue(TRUE) + * because we CAN NOT guarantee access to the added files + * when sending mails from the Queue, since this allows temporary files etc. + * + * @param string $path + * @param string|null $name + * @param string|null $contentType + */ + public function addFileFromFilePathForDirectSending(string $path, string $name = NULL, string $contentType = NULL) { + $this->mailMessage->attachFromPath($path, $name, $contentType); + } + /** * @return MailMessage */