Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Mail Message Format problem with ADF Component

ManishPandeyFeb 24 2014 — edited Feb 24 2014

Hi All,

i'm using jdev 11.1.1.5.0 version.

In my use case i'm using java mail api to read mail from mail server and want to display on jspx page output component.

but problem is that when i access message and print message in console using System.out.println() message printed on console with formatting.

but when i set message value in output text using binding like msgbody.setValue(msg) it's display message but without formatting.

code is following...

            Folder inbox = store.getFolder("INBOX");

                 inbox.open(Folder.READ_ONLY);

                 Message msg = inbox.getMessage(inbox.getMessageCount());

                 Address[] in = msg.getFrom();

                 for (Address address : in) {

                     System.out.println("FROM:" + address.toString());

                 }

                 Multipart mp = (Multipart) msg.getContent();

                 BodyPart bp = mp.getBodyPart(0);

                 System.out.println("CONTENT:" + bp.getContent());  // this line display message in proper format.

like this

This is test mail..

Regards..

Rafat Siddiqui

Project Specialist-IT

Work ex-456,Mo-9554038413

but in outputText message show like..

This is test mail.. Regards.. Rafat Siddiqui Project Specialist-IT Work ex-456,Mo-9554038413


so my question is that how to display message on jspx page in proper format.


thanks in Advance

Manish

This post has been answered by Timo Hahn on Feb 24 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2014
Added on Feb 24 2014
4 comments
243 views