Jump to content

Sending SuperContainer file as Email attachment


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

Recommended Posts

hi -- i'm trying to write a script to email an attachment of a file that I stored with Supercontainer. if the table related to the document I have stored is called Document, here is my script:

Set Variable [ $result; Value:SCDownload("Document/" & DOC::(_pk_DocumentID ; Get (DesktopPath)) ]

The I use the Send Mail via SMTP Server step and I write this in the Attachment section:

Attachment: “file:$result”

Any ideas on what I doing wrong?

Link to comment
Share on other sites

the file name is prob not the same as the path to the file in SC once the file is saved to the desktop you should give the file name. and use that name in connection with the desktop path. for your attachment.

Remember SC saves files in a folder that matches your pk_DocumentID and the real file xyz.jpg is inside that folder - when it saves to the desktop you need to target the real file.

I've just used native export field contents if the field is a calculated container field using the SC Plugin.

Link to comment
Share on other sites

Here is a script example that will do this for you.

Set Variable [$baseurl; Value:SCSetBaseURL("http://yourhostIP/yourdirectory")]

Set Variable [$filepath; Value:"your/local/download/directory" & "yourdownloadedfile.name"]

Set Variable [$calldownload; Value: SCDownload(SC_test::kf_yourkeyfield; "your/local/download/directory")]

Send Mail [send via SMTP Server; No dialog; To: "[email protected]"; Subject "email subject"; Message: "test email message body"; "$filepath"]

If you do not specify a download directory FileMaker will save the file in your system's temporary folder.

Link to comment
Share on other sites

This topic is 5464 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.