I am doing a PHP mailer that needs to do file attachments. What I don't get is if you need to specify the MIME type, how would you go about detecting what kind of file it is and assigning the corresponding MIME type?
For example, if a user wants to upload a file and use it as an attachment, it could be anything. How would the script know?
Thanks
Aaron