JavaMail image message attachment
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

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

Hello!

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

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.

Regards
About | Sitemap | Contact