function GetAttachments($msgno, $include_raw_data = true)
	{
		$struct = imap_fetchstructure($this->mbox,$msgno);
		$contentParts = count($struct->parts);
		$attachments = array();

		if ($contentParts >= 2) 
		{
			for ($i=2;$i<=$contentParts;$i++) 
			{
				$att[$i-2] = imap_bodystruct($this->mbox,$msgno,$i);
				// these extra bits help us later...
				$att[$i-2]->x_msg_id = $msgno;
				$att[$i-2]->x_part_id = $i;
			}
			
			for ($k=0;$k<sizeof($att);$k++) 
			{
				if ( strtolower($att[$k]->parameters[0]->value) == "us-ascii" && $att[$k]->parameters[1]->value != "") 
				{
					$attachments[$k] = $this->_getPartFromStruct($att[$k],$include_raw_data);
				} 
				elseif ( strtolower($att[$k]->parameters[0]->value) != "iso-8859-1" ) 
				{
					$attachments[$k] = $this->_getPartFromStruct($att[$k],$include_raw_data);
				}
			}
		}
		
		return $attachments;
	}