Attach file with original name to mail throws exception
Hello,
I am trying for hours now to attach files to a mail, but without success. I am using the filament 3 function.
Code which works
But I want to add the stored file names and that does not work. I get the following exception
Please someone can help
Maybe there is a better way to attach files in filament 3 I dont know of.
2 Replies
this isn't a filament issue
You need to provide the filepath for the document to send it, you are returning the UserTemplate model.
$attachment needs to be the filepath /var/www/mysite/storage/files/myfile.pdf
Got it thanks
Did it like so