We don’t use the SEND_MAIL
function with attached files in our OM-V8 system. However, I’m
going to guess that it has the same restriction as the IMPORT function. They both have the similar informational
caveats though IMPORT is a bit more informative:
SEND_MAIL – “Indicate the UNC path if you use more than
one email Agent. No particular Agent is exclusively responsible for sending
emails.”
IMPORT – “In a distributed
UC4 environment (work processes run on different computers) you can not
determine on which computer the import will be made. We therefore recommend
specifying the UNC path under Windows. Please note that the server should run
under an appropriate domain user so that the UNC names can be accessed. For
UNIX server, the absolute path must be indicated in UNIX notation.
Additionally, the file system needs to be accessible (NFS; mount command) but
it is not important on which computer it is located. This is the only way to
assure that the required file is used.”
For the IMPORT that means
that if your UC4 System is on a UNIX platform there is no way to pass the
host/server to the function so it will know where to find the file. In our environment we do not have NFS or something
like Samba for our system. Our
circumvention is to place a copy of the XML to be imported on all of our work
processors before execution of the function; a real pain, but it works.
Perhaps this is what is
happening in your case.
As far as passing the file name on the function, assuming I understand your question, you can do something like this:
:SET &sourcefile = "\Apps\Operations\Project19\Copyjob\test.txt"
:SET &rc = SEND_MAIL(the_receiver,the_cc,"the subject","the text",&sourcefile)