Study the upload example and get that working first.

Then when you have that working including the PHP part of it (critical).

Now look in some PHP resources for how to send email with attachments, there are some ready to use classes you can use are out there I'm sure. incorporate this into the PHP that accepts the upload.

One thing at a time when approaching a complex task. Get the upload working first..