Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By masman71
#783710
I am running Processmaker 3.0 on my windows 7 professional machine in order to understand the capabilities of processmaker and I have run into an issue.

I have been trying to send an email with an attachment using pmf send message trigger.

I have been able to send an email with and attachment using the following code:

@@Mail_sent = PMFSendMessage(@@APPLICATION, "example@gmail.com", "example2@gmail.com", "", "", @@AFE_Name, "AFE_Overview_Template.html", array(), array("AFEUpdate.pdf" => "C:\Users\example\Downloads\DEP_1101.pdf"), true, 0, "");

However I want to send an input document which has been created in a previous step.

I have used the code per the wiki as follows:

@@Mail_sent = PMFSendMessage(@@APPLICATION, "example@gmail.com", "example2@gmail.com", "", "", @@AFE_Name, "AFE_Overview_Template.html", array(), array("AFEUpdate.pdf" => PATH_DOCUMENT . @@APPLICATION . PATH_SEP . "14575195355a667153dd634044227978_1.pdf"), true, 0, "");

The UID above matches the input document I want to send.

However the email attachment has not been successfully sent using this code.

After some trial and error I ran the following to determine if the path was pulling correctly:

@@DEbugger = PATH_DOCUMENT . @@APPLICATION . PATH_SEP . "14575195355a667153dd634044227978_1.pdf";

The result was as expected: Debugger now has a value of:
C:/Users/example/AppData/Roaming/ProcessMaker-3_0_0_3_community/processmaker/shared/sites/workflow/files/98657226555a7d244b61610065242196/14575195355a667153dd634044227978_1.pdf

However when I plug that value into windows explorer I got an error. After further investigation the file path in windows is:
C:\Users\example\AppData\Roaming\ProcessMaker-3_0_0_3_community\processmaker\shared\sites\workflow\files\986\572\265\55a7d244b61610065242196/14575195355a667153dd634044227978_1.pdf

It appears that windows is parsing the first nine characters of the CASE_UID into seperate folders when it is creating the file structures.

Any thoughts?
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]