Understand the Exception First!!!
Your message content returning String and you are trying to type cast to Multipart.
Object content = msg.getContent();
if (content instanceof String)
{
String body = (String)content;
...
}
else if (content instanceof Multipart)
{
Multipart mp = (Multipart)content;
...
}