View Single Post
Old 08-10-2008, 08:43 PM   #1 (permalink)
arv
Knows Where the Search Button Is
 
Join Date: May 2007
Location: indonesia
Model: 8800
PIN: N/A
Carrier: vodafone
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How To Programmatically receive Attachment

Please Login to Remove!

Hi All,

where i can find example about getting attachment from a Message (mail API)?

I already implement folderlistener, and its messagesAdded(FolderEvent).
I got Message from FolderEvent, Message as instanceof Multipart.

the Multipart consist of 2 BodyParts,
my attachment in BodyPart index number 1.

I check bodypart.hasMore() it's true, means any content in server.
I call Transport.more(bodyPart, true);
but the bodypart.hasMore() always true (i try to loop about 2 minutes,
but it's always true).
My attachment only about 100 Bytes.

when i check message.getClass().getName() its
belong to UnSupportedAttachmentPart with size == 0.

is it any example how to get attachment by program?

thank you ..

Last edited by arv : 08-10-2008 at 09:06 PM.
Offline   Reply With Quote