I had seen another forum post about "long meaningless filenames", and now I have them.
Even though the file is named "perfectly" at the server (Invoice123.PDF), doing it using this method generates the bogus object name... and thats what shows up when the customer gets his email. Attachment named "020272495469116503_RDDoc2554125968157462316.PDF" which in no way is acceptable.
Initial method to send an email with the invoice attachment:
this method stored the file in the db
EXPORT DOCUMENT 'invoice' TO FILE 'Invoice123.PDF"
CREATE outgoingemail WITH ..... {basic fields}
IMPORT DOCUMENT outgoingemail.attach1 FROM 'Invoice123.PDF"
Now, add change to store on file system and add a Attach1_PATH field. I also put a RULE on the Path to set it WHEN NEW.
NOT NEEDED EXPORT DOCUMENT 'invoice' TO FILE 'Invoice123.PDF"
CREATE outgoingemail WITH ..... {basic fields} PLUS
outgoingemail.Attach1='Invoice_Report"
ONT NEEDED IMPORT DOCUMENT outgoingemail.attach1 FROM 'Invoice123.PDF"
So, a bit simpler. i'm running the report just by assigning it to a field in the email. Problem is, it creates a random, unique filename for the report.
The benefit is that is TRULY is stored on the server.
NOTE: So far, the only benefit is that the file is saved ONLY on the file system and not in the DB. It still takes the same time to run the report (in my case I really run 2, and have 2 attachments) and still takes the same amount of time to send the email (45 seconds). (1 attachment is 25k, and the other test one is 13Meg. Many will be bigger than that.)
The key would be to find someone out there who is:
*) Generating a report to attach to an email
*) Not storing in the DB
*) Getting an attachment to be sent as a useful name
jaymer...