Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Think it depends on the MIME type of the message.
This might help
java - How to read text inside body of mail using javax.mail - Stack Overflow
javax.mail.BodyPart.getContent java code examples | Tabnine
Mime type is Multipart I want exact html format as it is sent to me
Problem:
I am using email pool to read the email the data I am receiving is in multipart or in text format the code which I am using is here.
if (message.getContent() instanceof Multipart) {
Multipart multipart = (Multipart)message.getContent();
for (int j = 0; j < multipart.getCount(); j++) {
BodyPart bodyPart = multipart.getBodyPart(j);
String disposition = bodyPart.getDisposition();
if (disposition != null && (disposition.equalsIgnoreCase("ATTACHMENT"))) { // BodyPart.ATTACHMENT doesn't work for gmail
debug("Attachment found");
} else {
content= bodyPart.getContent().toString();
break;
}
}
} else {
content = message.getContent().toString();
}
Outpout:
1.Simple Text
2. Mime Multipart
Requirement:
Read the email body in html format so it will be good to read
so please suggest me how can I read the body content in html format istead of text or multipart