You can use following code to write in text file. But you should use cdonts to send email.
HTML Code:
<html> <body> <%
Set fileObj=Server.CreateObject("Scripting.FileSystemObject")
set file1=fileObj.CreateTextFile("my.txt")
file1.WriteLine("Test")
file1.WriteLine("Another Test")
file1.Close
set file1=nothing
set fileObj=nothing
%> </body> </html>