function GetPart($msg_number, $mime_type, $structure = false, $part_number = false) 
	{
		$stream = $this->mbox;
		$prefix = "";

		$structure = $structure ? $structure : imap_fetchstructure($stream, $msg_number);
		
		if ($structure) 
		{
			if ($mime_type == $this->GetMimeType($structure)) 
			{
				$part_number = $part_number ? $part_number : "1";
				$text = imap_fetchbody($stream, $msg_number, $part_number);
				
				if ($structure->encoding == 3) 
				{
					return imap_base64($text);
				} 
				else if ($structure->encoding == 4) 
				{
					return imap_qprint($text);
				} 
				else 
				{
					return $text;
				}
			}

			if ($structure->type == 1) /* multipart */ 
			{
				while(list($index, $sub_structure) = each($structure->parts)) 
				{
					if($part_number) 
					{
						$prefix = $part_number . '.';
					}
					$data = $this->GetPart($msg_number, $mime_type, $sub_structure,$prefix .    ($index + 1));
					
					if($data) 
					{
						return $data;
					}
				}
			}
			
		}
		
		// no structure returned
		return false;
	}