In this post, I will explain the file uploading and attachment feature introduced in Contact Form 7 1.9. If you are not familiar with Contact Form 7, please read the plugin homepage and FAQ first.
Summary
With this feature, you can allow your visitors to upload their files via your form, and then an email with attachments of the files is sent to you.
Please note that this feature uses the API of WordPress 2.7. So, in order to use it, you will need to upgrade your WordPress if you are using WordPress 2.6.x or older.
To set up, two steps are needed: 1) Add file uploading fields in your form, 2) Set up your mail settings to attach the uploaded files. The two steps will be explained in the rest of this post.
Adding file uploading fields in your form
Like other types of form fields, you add a tag code into the Form area in the Contact Form 7 admin panel (Tools > Contact Form 7 in WordPress 2.7).
The tag of file upload feild is like this:
[file your-file]
As with other types of tags, ‘file’ means the type of tag, and ‘your-file’ means the name of the tag.
You can use several options with ‘file’ typed tags. To limit the max file size, use the ‘limit:’ option like this:
[file your-file limit:100000]
The unit of the digits is ‘byte.’ So ‘limit: 100000’ means that the limited max file size is approximately 100 kB.
To limit acceptable file types, use ‘filetypes’ option like this:
[file your-file filetypes:gif|png|jpg|jpeg]
List the file extensions after ‘filetypes,’ and separate them with ‘|’
(pipe) character when you set multiple file types.
You can also generate these tags with the Tag Generator, of course.

Set up file attachments with a mail
For file attachments, the new field File attachments is added in the Mail field set in the Contact Form 7 admin panel. To attach the uploaded files to the mail, put tags into this field as shown below.
File attachments:
[your-file]
As other tags used in the Mail field set, only the name (in this case, ‘your-file’) is needed. Don’t put the tag’s type or options.

If you have multiple files uploaded and want to attach them into an email, simply line them up like this:
File attachments:
[your-file][your-another-file]

