src/Net/IMAP/Message.php
protected function getBody( $type )
	{
		$count		= 0;
		$structure	= $this->getMessageStructure();
		foreach( $structure->parts as $part )
		{
			$count++;
			if( $part->type !== 0 )
				continue;
			if( $part->subtype == $type )
			{
				$body	= imap_fetchbody( $this->stream, $this->messageNumber, $count );
				$body	= $this->decodeBody( $body, $part->encoding );
				return $body;
			}
		}
	}
protected function getBody( $type )
	{
		$count		= 0;
		$structure	= $this->getMessageStructure();
		foreach( $structure->parts as $part )
		{
			$count++;
			if( $part->type !== 0 )
				continue;
			if( $part->subtype == $type )
			{
				$body	= imap_fetchbody( $this->stream, $this->messageNumber, $count );
				$body	= $this->decodeBody( $body, $part->encoding );
				return $body;
			}
		}
	}
protected function getBody ( $ type ) { $ count = 0 ; $ structure = $ this -> getMessageStructure ( ) ; foreach ( $ structure -> parts as $ part ) { $ count ++ ; if ( $ part -> type !== 0 ) continue ; if ( $ part -> subtype == $ type ) { $ body = imap_fetchbody ( $ this -> stream , $ this -> messageNumber , $ count ) ; $ body = $ this -> decodeBody ( $ body , $ part -> encoding ) ; return $ body ; } } }
Returns Body.
@access		public
@param		string		$type		Body Type (TYPE_PLAIN | TYPE_HTML)
@return		string
Returns Body .