The body of the message I receive is html structured but the type of the message says text/plain. In javax.mail getContent() returns plain text instead of html structured text. Even getBodyPart() returns just text.
Is there a way of actually extracting the html formatted message body from an email message marked as text/plain?
Object content = inMessage.getContent();
MimeMultipart mimeMultipart = (MimeMultipart) content;
BodyPart bodyPart = mimeMultipart.getBodyPart(i);
String cnt = (String) bodyPart.getContent());
cnt is a plain text instead of being html formatted. I know it is html because Outlook reads it as html and ViewSource in Outlook is html email.
Thank you