- Thu Jan 19, 2017 5:44 pm
#788605
Hi
I need to use the PMFSendMessage() function to send an email with an attachment. The problem is that the file I'm trying to send is not a file that was uploaded in the case. Instead, it's a template file I uploaded into a folder I created in the processmaker file system. I found this example in the wiki, but I don't understand how the path is constructed and how to modify it for my folder:
Thanks.
Chris
I need to use the PMFSendMessage() function to send an email with an attachment. The problem is that the file I'm trying to send is not a file that was uploaded in the case. Instead, it's a template file I uploaded into a folder I created in the processmaker file system. I found this example in the wiki, but I don't understand how the path is constructed and how to modify it for my folder:
Code: Select all
My folder is /TEMPLATES$aAttachFiles = array(
PATH_DATA_PUBLIC . @@PROCESS . PATH_SEP . 'companyLogo.png',
PATH_DATA_PUBLIC . @@PROCESS . PATH_SEP . 'companyProfile.pdf'
);
$usr = userInfo(@@USER_LOGGED);
PMFSendMessage(@@APPLICATION, 'manager@acme.com', $usr['mail'], '', '',
'Company Information', 'companyInfoTemplate.html', array(), $aAttachFiles);
Thanks.
Chris