| Author |
Viewing email on swing
|
siyabonga khanyile
Greenhorn
Joined: Aug 22, 2008
Posts: 12
|
|
Hi,
I'm getting emails from the exchange server and saving them on the file system as .eml files for later use. is there any way or library that i can use to display the original the files on a Jframe, something like icepdf that takes a pdf file and display it on a Jframe.
Thanks
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
With JavaMail you can read them. Then there are a few options:
- it's a plain text email (with or without attachments). A JTextArea will display your body just fine.
- it's an HTML email (with or without attachments). A non-editable JEditorPane will display your body just fine, except for embedded images.
- it's an email with both plain text and HTML parts (multipart/alternative). Choose which one to show.
The embedded images will be the main issue here.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
siyabonga khanyile
Greenhorn
Joined: Aug 22, 2008
Posts: 12
|
|
|
i was thinking along the same line as well, but i just thought there might be a lib that you can use so that you don't have to go through the message body and check for different content types or disposition. I guess i'l just have to do it that way then. Thanks a mil
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Well, there might be, and if there is one it may have solved the embedded contents issue. Perhaps someone else knows of such a library. I just don't.
|
 |
siyabonga khanyile
Greenhorn
Joined: Aug 22, 2008
Posts: 12
|
|
yah maybe there is...but i think i've searched almost the whole internet now
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8430
|
|
You might want to check out the lobo browser
Note I haven't used it myself but I think it is embed able in other components.
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
 |
|
|
subject: Viewing email on swing
|
|
|