Mail decoding and reading

From: Date: Wed, 28 Jun 2000 05:48:21 +0000
Subject: Mail decoding and reading
Groups: php.general 
Request: Send a blank email to php-general+get-3500@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 it. 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: image/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 ?

« previous php.general (#3500) next »