Yes, this can be done, and without using a plugin at all...
You can set up a script that does the export of the CSV to either the 'DocumentsPath' or 'TemporaryPath', and then use the script step to email using SMTP server, attaching that file.
You can then use 'Perform Script on Server' to trigger that script on the server. Works great on WebDirect too....
I tried it out and my script that runs on server looks something like:
Go to Layout [ "MyLayout" ]
Set Variable [ $path ; Value: Get (TemporaryPath) & "export.csv"]
Export Records [ No dialog; "$path"; Macintosh ]
Send Mail [ Send via SMTP Server ; No dialog ; To: "email@example.com" ; Subject: "my subject" ; Message: "My message text" ; "$path" ]
You will likely need to include a 'Find...' script step to make sure you export the set of records that you want.
Thanks! I was hoping that a server-side script could do this, but have never used server before. I'll try it out. The WebDirect docs didn't mention this.
Perform Script on Server (PSoS) is really useful for lots of things :-)
You just need to remember that when you use it, the server does not know anything about which layout or found set of records your FileMaker Pro/Go/WebDirect client is currently using, so you will need to build that into the script that you want to run on server.
Very clear. Thanks so much.