Sending Application form by email

Hi, There
I'm currently working on a web site. There is an application form is required to be filled by visitors, my idea is simplely send the form to webmaster by email in the format of attachment, like .doc or sth, i wonder how am i suppose to make it happen.
Many thanks

Martin
 
Just want to make my question a bit more clear. I'm actually focus on how can i save the application form's information on the server in the format of doc or html file
thanks a lot, guys
 
Wouldn't be easy to store it into a db?
Anyway, with ASP, you can make a .txt file using File System Object.
 
You can't attach a record from a db into an email. :) But yeah just use the FileSystemObject to create a temporary file and then attach it to the email.

Creating it as a .HTML file would be easiest - although some email clients may display it inline, instead of as an attachment, as it's html. Anyway test the results yourself, using .txt or .html, to see if you get the desired result.

Create the file name using the Session ID (ie. Session.SessionId) string - that will ensure it's unique for each visitor in case of simultaneous requests for it.
e.g. strFilename = Session.SessionId & ".html"

Remember to delete the file after sending. Use ASPEmail to send, rather than CDO. This is because CDO will queue the email, therefore you may delete the file before it needs to be used when CDO gets around to actually sending it. ASPEmail will send it straight away, so you can safely delete the file after the .Send method is called.

Hope that helps. :)
 
Back
Top