Determine MIME type of attachments