This question is more appropriate for the Server-side Scripting forum.
It's very likely that your web hosting company has a form delivery script available for use by their customers, and that instructions are provided for its use. If not, and if you are permitted to run cgi scripts, you may want to try the nms FormMail script from
http://nms-cgi.sourceforge.net/scripts.shtml . It appears from your question that you want to give users the ability to send a file to you via e-mail. That's a far more complicated task than it appears; I recommend that you abandon that part of the plan.