Hello.
When using imap_fetchbody to retrieve an e-mail message with a file attachment there is an array element named 'type' which I have come to believe is an internet media type. This is always represented by a number and I'm struggling to find any documentation as to what internet media type the numbers represent. Any help on this is appreciated.
Regards,
Internet media type returned by imap_fetchstructure
Moderator: General Moderators
- andym01480
- Forum Contributor
- Posts: 390
- Joined: Wed Apr 19, 2006 5:01 pm
It would seem the information you require is in the php manual!!! http://www.php.net/manual/en/function.i ... .php#43405. The poster has written a function that relates the numbers to types for attachments
Hope that helps
Hope that helps
The imap library doesn't test the actual data, it only parses the header data in the mail. Don't trust this value.http://de2.php.net/imap_fetchstructure wrote:Table 144. Primary body type
0 text
1 multipart
2 message
3 application
4 audio
5 image
6 video
7 other