saf Posted January 22, 2008 Share Posted January 22, 2008 I am writing an application that uses the php imap protocol to read emails. I just got done configuring the system to a point where I can read emails and see a list of attachments. My next step is to be able to download these attachments. Here is my problem: I am trying to pass MIME types for specific attachments but cannot seem to find a working MIME Content Type function within the php manual. Can anyone please find me a solution to extracting a MIME type from a file. Note: I am trying to stay away from PECL, and I do not want to have an entire list of MIME types manually coded into my code either. Thank you, Saf Quote Link to comment https://forums.phpfreaks.com/topic/87243-reading-mime-content-types/ Share on other sites More sharing options...
ziv Posted January 22, 2008 Share Posted January 22, 2008 The PECL Mime type extension is deprecated. You can use the file info family functions. Quote Link to comment https://forums.phpfreaks.com/topic/87243-reading-mime-content-types/#findComment-446272 Share on other sites More sharing options...
saf Posted January 22, 2008 Author Share Posted January 22, 2008 I'm sorry if i'm wrong but to my knowledge the deprecated function was a native php function and the file info family of functions are the PECL functions (Something i'm trying to stay away from). Please correct me if i'm wrong. -Saf Quote Link to comment https://forums.phpfreaks.com/topic/87243-reading-mime-content-types/#findComment-446275 Share on other sites More sharing options...
ziv Posted January 22, 2008 Share Posted January 22, 2008 you're not wrong - both mimetype and fileinfo are PECL extensions. take a look at the Zend Framework - they have an implementation for mail & mime. Quote Link to comment https://forums.phpfreaks.com/topic/87243-reading-mime-content-types/#findComment-446299 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.