dcsimg
Getting Message Size in Bytes
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andrew_Cao
Posted On:   Tuesday, October 21, 2003 11:18 PM


Hi



Is there a way in JavaMail that I can know the

byte size of a Message/MimeMessage received

on a mail server?

Do I have to retrieve that message in full?



Thanks

Re: Getting Message Size in Bytes

Posted By:   Eugene_Kuleshov  
Posted On:   Wednesday, October 22, 2003 07:39 AM

You can retrieve only message headers using the following code:

Message[] messages = folder.getMessages();
folder.fetch( messages, new FetchProfile() {{ add( FetchProfile.Item.CONTENT_INFO)}});
About | Sitemap | Contact