View Single Post
  #7 (permalink)  
Old 01-07-2008, 07:58 PM
cmbl cmbl is offline
Member
 
Join Date: Jan 2008
Posts: 7
cmbl is on a distinguished road
thanks.

The above code gets all the emails in the mail box. But what i need is, i need to read the attachment of the mail which i have opened into the java application.
For this i was taking a different approach of using a Clipboard, because when we do CTRL+C on a file attachment in a email, the attachment is copied to the clipboard as bytes. I need to know how to read the contents in the System clipboard which are in bytes. We need to define a DataFlavor to read bytes from System Clipboard.


Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.getData(DataFlavor.StringFlavor);

A string flavor means any data as strings are retrieved. What i need to get is the data which is in bytes.

Hope u r clear with the
Reply With Quote