aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Viewing email on swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Viewing email on swing" Watch "Viewing email on swing" New topic
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: 19542
    
  16

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 - OCEEJBD 6
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: 19542
    
  16

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: 9990
    
    7

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Viewing email on swing
 
Similar Threads
How to write a program to download program
Should client GUI render if exception occurs during startup ?
refreshing the jframe[urgent]
Helped needed: JBuilder 9 Display a .jpg image
Excel file is corrupted when i download it