Let me give you some hints..
First you need to write and save the data to CSV file.
The CSV file should be physically saved somewhere on your web server.
For above you may use ASP file system object .
After CSV file is saved to your web server, use the Attachment property of your email object to attach CSV file.
Hope that helps.
Thanks!
Zeeshan Dar
CEO iRealtySolution