IMAP extension and attachments
| From: | Martin Prasek | Date: | Tue, 27 Jun 2000 20:39:33 +0000 |
| Subject: | IMAP extension and attachments | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-3444@lists.php.net to get a copy of this message | ||
I have a MIME encapsulated message in the mailbox and I need to fech some
information about.
I try to use something like:
$Message_structure=IMAP_FetchStructure($stream,$nr);
because MIME mesages are recurent, I can fetch information about subparts
using something like this:
$Structure_of_subpart= $Message_structure->parts[$i]; where $i = is the n
umer of subpart, that I want to examine.
And then I can fetch the appropriate message body like this:
$body=IMAP_FetchBody($stream,$nr,$part) ; where $part si something like "1
.2.1" ...(Part 1,subpart 2 ... etc)
It is OK
But.
I need to get the header Content-type: for the $part of the message, bec
ause this header often contain a NAME of the file,like Content-type: ima
ge/jpeg;name=baby.jpg
it is important to have a right name for saving this part of the message to
disk.
I try to use $tructure_of_subpart->type , but id do not work.
The question is: How can I get the name or the Content-type: header line
for part of the message somewhere deep in the MIME encapsulation tree ?
Please execuse my bed English. It is not my native language.