I'm looking for a script that send out an email with a requested file as an attachment. In other words:

A user fills out a form and selects the file that he'd like to receive.
The form get submitted and sends out the desired file to the provided email address.

I have seen these script in perl but I'd like to have a php version.

I already searched hotscripts but could not find anything.

Thanks for your help!