lacomunidadnews

Saving Record as pdf and Sending it with Send Mail

Discussion created by lacomunidadnews on Jun 28, 2016
Latest reply on Jun 28, 2016 by jrenfrew

I have been working on a script that saves the current record as a pdf file and sends it automatically via FileMaker's Send Mail script.

 

I have tried doing:

 

Set Variable [$Output; Value: Get( TemporaryPath ) & “sample.pdf”]

Save Records as PDF [No dialog; “$Output”; Records being browsed]

Send Mail [Send via E-mail Client; To: “ex@example.com”; Subject: “Invoice” ; Message: “Test”; “$Output”]

 

as directed by FileMaker support, but still the pdf does not attach, and I am wondering if it is even saving the file because I can not find it in the same directory that FileMaker is in.

 

I also tried this -

 

Save Records as PDF [No dialog; “receipt.pdf”; Records being browsed]

Set Variable [$Output; Value: Get( TemporaryPath ) & “receipt.pdf”]

Send Mail [Send via E-mail Client; To: “ex@example.com”; Subject: “Invoice” ; Message: “Test”; “$Output”]

 

Here I find the receipt.pdf file in the same directory that FileMaker is in, but the email still has no attachment when received. Any help would be awesome, thanks!

Outcomes