I have a CSV file:
$fileContent = $tempLocalDriver->get($file->getFilename()); // UTF-8
next, this file movie to the job:
$fileInfo = [
'file' => base64_encode($fileContent),
'name' => sprintf('attachment.%s', $file->getClientOriginalExtension()),
'mime' => $file->getClientMimeType()
];
ProductImportNotificationJob::dispatch($user, $fileInfo);
In process instance mail-item and run this code:
$mailObject = new ProductImportNotificationEmail();
$mailObject
->attachData(
base64_decode($fileInfo['file']),
$fileInfo['name'],
['mime' => $fileInfo['mime']]
);
0 Replies