in reply to Saving and emailing attachments from web forms
I would look at the documentation for the module CGI as this has an example of file upload which should serve as a good basis for what you want to do.
/j\