Re: Mail decoding and reading

From: Date: Wed, 28 Jun 2000 10:43:47 +0000
Subject: Re: Mail decoding and reading
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3531@lists.php.net to get a copy of this message
Martin Prasek wrote: > 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 You can get numeric values for Content-type (type parameter) and encoding (encoding parameter)... eg. multipart is 1, aplication 3, img 5, base64 is 3... > > > 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. filename and name should be under dparameters and parameters... > > > 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 ? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Bojan Gajic <bojan@inet.co.yu>

« previous php.general (#3531) next »