I am looking for pointers and information on how I would achieve attaching a CSV file of a submission to the email notification that gets sent to an administrator. As far as I can tell there is no API for the CSV generation. So the process will likely need to be:
1. Hook into the form save and generate a CSV file
2. Store that CSV file on the server
3. Attach that CSV to the email that gets sent to the admin or perhaps send it afterwards
My big concern is that I will not be able to generate the CSV before the email gets sent.
Any thoughts would be greatly appreciated.