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