When I did my script I did following things:
1. read the file content on server by using fread
2. Then MIME code the content and attach it to the email
3. send the email
This kind of method worked for me. The only problem whihch I enocounted was the file name which appears in email (name is same than filepath)