Jump to content

Server side scripted email attachment path

This topic is 1711 days old. Please don't post here. Open a new topic instead.

Recommended Posts


This is driving me nuts. 

Need to send emails with an attachment from server side script. 

The attachment path calculates correctly, as far as I can tell. Permissions are 777 (I Know...), but the file still does not attach!


This is the variable calculation that yields the path: 

"/Samsung SSD/Library/FileMaker Server/Data/Documents/"&$filename


Only problem is: attachments don't attach!

I have tried every iteration I could think of: 

"filemac:/Samsung SSD/Library/FileMaker Server/Data/Documents/"&$filename



What am I missing here???


Thank you!! I can't believe I'm the only one who ran into this issue?

Link to comment
Share on other sites

How about approach it from the other direction: try using the (new in FM18) Create Data File script step followed by Write Data File, and see if the server can create a file using your file path.  Maybe that will help you debug?  See https://fmhelp.filemaker.com/help/18/fmp/en/index.html#page/FMP_Help%2Fcreate-data-file.html%23ww1258616


Also, I find that FMserver is sensitive to file ownership - if you right-click the file, get info in the finder, you can set the file to be owned by the 'fmserver' user.  You might need to do that to the enclosing folder, too.   Does that help?


Link to comment
Share on other sites

You don't need to calculate the path up to the Documents folder inside the FMS folder.  Just use Get(DocumentsPath) for that part and it will always be correct.  But you have to calculate the complete path ahead of time and put it in a variable, in the Attachment  "attache file" dialog you should just specify a single variable.  That window is not a calculation dialog so you cannot put a calculation in there.

Link to comment
Share on other sites

This topic is 1711 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.