Automatic File Attachment
Using Filemaker Pro 9
When sending an email via Filemaker how do you attach a variable file to the email?
Do you store the path to the file you with to attach in the same record or a related record?
If so you will need to set a variable [$FilePath] to the value of the field, or if not the file path you want to attach to the record, and then specify that variable in the Send Email scritp step by selecting 'Attach File' and specifying the name of the variable [$FilePath].
If you are doing this for multiple records you will also need to loop through each record setting this individually. It would look something like this
Go to Layout [List]
Go to Record/Request/Page [First]
#Create and Send Report 1
Set Variable [$FilePath; FilePathField]
Send Mail [To:"firstname.lastname@example.org"; "$FilePath"]
Go to Record/Request/Page [Next ; Exit after last]
I hope this makes sence
Thank you for the solution.
It would not work for a local variable [$FilePath] even though the two lines followed each other in the script.
It did however work if i set the variable to global [$$FilePath]
It does not make sense, but it works.
Retrieving data ...