AnsweredAssumed Answered

Send Mail with Attachment

Question asked by cretool on Feb 15, 2012
Latest reply on Feb 15, 2012 by BowdenData

I'm having an issue with sending an attachment in an email when running a script on a server schedule.

 

I am using a Xserve OSX 10.6.8 and FMS 11.0.3.309

 

I have a report of completed tasks and want the report to run every weekday at 6 PM.

 

When I run the script on the client side from a button (as an instant override to waiting) the script runs the report, saves in on the server as a pdf in the right location, creates the email, fills in the body and attaches the correct pdf.

When I run the script through the server schedule, the file won't save. The server then sends an email with the body but NO attachment.

 

I am creating the path using variables. Here is the code to create the path and file name:

 

Let([

CurrentDate = Get(CurrentDate);

month = Month(CurrentDate);

day = Day(CurrentDate);

year = Year(CurrentDate);

date =month&"_"&day&"_"&year;

path = "filemac:/Sever/Marketing/Daily Completed Tasks/";

name = "Daily_Completed_Tasks_";

type = ".pdf"

];

 

path&name&date&type

 

)

 

 

Should my variable for path be different because the script is being run on the server and not from a client on a different computer? If it does need to be different, what should it be?

Outcomes