dcsimg
How to read an attachment of an e-mail using javamail
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   shilpa_nc
Posted On:   Monday, May 8, 2006 01:38 AM

Hi all,
Please help me in reading an attachment of an e-mail using imap.


I am able to read the plain text f an e-mail but when i tried for reading attachments and saving it iam getting IOException as NO CONTENT.
Iam using inputstram for reading.
But problem is iam geting content size as 0 bytes only but it is giving the line count.
Please help me in this.
Regards,
Shilpa

Re: How to read an attachment of an e-mail using javamail

Posted By:   amit_sutar  
Posted On:   Monday, June 26, 2006 08:55 AM

Hi,


Try out


String temp = message.getContent();

if(temp!=null)

Multipart multipart = (Multipart)temp ;




to avoid No Content Exception



-amit
About | Sitemap | Contact