note 41262 added to function.imap-fetchbody

From: Date: Sun, 04 Apr 2004 19:56:10 +0000
Subject: note 41262 added to function.imap-fetchbody
Groups: php.notes 
Request: Send a blank email to php-notes+get-67631@lists.php.net to get a copy of this message
// $uid - msg number function read_all_parts($uid){ global $mime,$ret_info,$enc; $mime = array("text","multipart","message","application","audio", "image","video","other","unknow"); $enc = array("7BIT","8BIT","BINARY","BASE64", "QUOTED-PRINTABLE","OTHER"); $struct = imap_fetchstructure( $this -> Link, $uid ); $ret_info = array(); function scan($struct,$subkey){ global $mime,$enc,$ret_info; foreach($struct as $key => $value){ if($subkey!=0){ $pid = $subkey.".".($key+1); } else { $pid = ($key+1); } $ret_info[]['pid'] = $pid; $ret_info[key($ret_info)]['type'] = $mime["$value->type"]; $ret_info[key($ret_info)]['encoding'] = $enc["$value->encoding"]; next($ret_info); if(($value->parts)!= null) {scan($value->parts,$pid); } } } scan($struct->parts,0); return $ret_info; } ---- Manual Page -- http://www.php.net/manual/en/function.imap-fetchbody.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41262 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41262&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41262&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67631) next »