Process the Body
A MIME part provides an isMultipart() function for determining if a part contains multipart content, as shown below:
 
if (message.isMultipart())
{
// process a multipart message (See below.)
}
else
{
// process a simple message (See below.)
}