JavaMail image message attachment
1 posts in topic
Flat View  Flat View

Posted By:   Stanislav_Davydov
Posted On:   Thursday, September 19, 2002 09:29 AM


I've got a problem with fetching message image attachment. I'm using JavaMail 1.3 and trying to fetch message from IMAP. When I get a message with image attachments I see them as Part objects with content type "image/gif" and content class object java.awt.Image.

Is it possible to get this attachment as InputStream? Or otherwise how could I get content of this image file?

Best regards,

Re: JavaMail image message attachment

Posted By:   Anonymous  
Posted On:   Thursday, September 19, 2002 02:23 PM

Take a look at the javax.mail.internet.MimeBodyPart.getContentStream() method. Alternately, you could use javax.mail.Part.getContent() to return the MIME message part as a java Object.

About | Sitemap | Contact