The easiest module I've found for sending emails with attachments is
MIME::Lite. The standard
CGI module will handle file-uploads well. Sorry, I have no ready script laying about that does exactly this.
Also note that you might not want any random person on the net to send email to any other random email address (I'm referring to the "To" field in your description) - I've seen too many spammers abuse mail scripts like that. The web is not as friendly as it was when I started my programming career :-)