hi need help. I am reading messages from mail box and writing the sender and body to a file. but in some cases especially where the body is short it just write the following message instead of the main message.
It is hard to understand. Please guide. himanshu
posted 11 years ago
Hi Himanshu, IMO, You must check the message contenttype first to see if it is just plain/text, doing so you can get the toString() to return the mail body, But in some cases looks like your content is a MultiPart content.By checking its type, u an then call get BodyPart on that multi part object and then call getcontent on it.