Hi there,
I have here the file from the filemanager
vfs://default/home/ki/sample.pdf
I used the set_attachments method in notications class for send email purposes. But I always fail to attach my file from the filemanager. I do not know how to extract these indexes: string, filename, encoding, and type form the file above.
Below is the function I mentioned.
public function set_attachments(array $_attachments) {
$this->attachments = array(); // clear array if set
foreach($_attachments as $attachment) {
if(is_array($attachment)) {
$this->add_attachment( $attachment[‘string’],
$attachment[‘filename’],
$attachment[‘encoding’],
$attachment[‘type’]
);
}
}
return true;
}
Please advise.
Thanks,
Ki