public function getPartByMimeType($mimeType, $index = 0)
    {
        $partFilter = $this->partFilterFactory->newFilterFromContentType($mimeType);
        return $this->getPart($index, $partFilter);
    }
public function getPartByMimeType($mimeType, $index = 0)
    {
        $partFilter = $this->partFilterFactory->newFilterFromContentType($mimeType);
        return $this->getPart($index, $partFilter);
    }
public function getPartByMimeType ( $ mimeType , $ index = 0 ) { $ partFilter = $ this -> partFilterFactory -> newFilterFromContentType ( $ mimeType ) ; return $ this -> getPart ( $ index , $ partFilter ) ; }
Returns the part associated with the passed mime type, at the passed
index, if it exists.

@param string $mimeType
@param int $index
@return MessagePart|null
Returns the part associated with the passed mime type at the passed index if it exists .