Is this part of the specified MIME type? This methode compares only the primaryType and the subType. The parameters of the content types are ignored.

For example, this methode will return true when comparing a Part of the content type "text/plain" wuth "text/plain"; charset=foobar".

If the subType of the mimeType is the special character '*', the subType is ignored during the comparation.

1 mail.mimePart.isMimeType

<mail.mimePart.isMimeType type='type'>
    <Part /> +
</mail.mimePart.isMimeType>
Example

Check the mime of a file.

Copy
<xsql-script name=''>
    <body>
    
    	<select prefix='m_'>
    	    <columns>mail_message</columns>
    	    <from table='wic_user_maildata ' />
    	    <where>
    	    	uid = 1949240
    	    </where>
    	</select>
    	   	
    	<set name='m_mimeMessage'>
    		<mail.mimeMessage>
    			<m_mail_message />
    		</mail.mimeMessage>
    	</set>
    	
    	<set name='m_mail_parts_array'>
    		<mail.mimePart.getParts><m_mimeMessage /></mail.mimePart.getParts>
    	</set>  
    	<iterator name='MimePart' index='idx'>
    		<in><m_mail_parts_array /></in>
    		<do>
  		
				<println>
					<mail.mimePart.isMimeType type='multipart/*'>
					 	<MimePart />
					</mail.mimePart.isMimeType>   	
				</println>
	
    		</do>
    	</iterator>	    	  	 	

    </body>
</xsql-script>