File upload from front-end form (as attachment) not working

Untested but I am pretty sure this is the issue:

You are trying to attach $uploadedfile to the email. You’ve set $uploadedfile to $_FILES['file']. That is a very temporary file/file location.

Once you use wp_handle_upload you want to be using $movefile instead. If you look at the Codex entry for that function you can see that you need (probably) $movefile['file'])

Leave a Comment

tech