- Wed Dec 20, 2017 5:41 pm
#812629
Good morning,
I am using web entry form and ABE function for my process.
Since the ABE doesn't support to send attachments within one email, so I have to send another email with the attachments, please find the following code for sending the attachments.
Many thanks,
Y
I am using web entry form and ABE function for my process.
Since the ABE doesn't support to send attachments within one email, so I have to send another email with the attachments, please find the following code for sending the attachments.
Code: Select all
So how could I get the URL of the files? Because I think maybe it is possible to add these URLs into the ABE email, therefore I don't need to send another email with the attachments. Is this possible??$caseID = @@APPLICATION;
$queryAttachment = "SELECT APP_DOC_UID, DOC_VERSION FROM APP_DOCUMENT where APP_UID='$caseID'";
$aFiles = executeQuery($queryAttachment);
if (is_array($aFiles) and count($aFiles) > 0) {
$aAttached = array();
foreach ($aFiles as $aFile) {
$d = new AppDocument();
$aDoc = $d->Load($aFile['APP_DOC_UID'], $aFile['DOC_VERSION']);
$filename = $aDoc['APP_DOC_FILENAME'];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$g = new G();
$filePath = PATH_DOCUMENT . $g->getPathFromUID($caseID) . PATH_SEP .
$aFile['APP_DOC_UID'] .'_'. $aFile['DOC_VERSION'] .'.'. $ext;
$aAttached = PMFAddAttachmentToArray($aAttached, $filename, $filePath);
}
PMFSendMessage($caseID, 'forms@gmail.com', @=test, '', '',
'Attachments', 'EmailNoticeForAttachment.html', array(), $aAttached);
}
Many thanks,
Y