> getFlags is not really important. But it also crashes when I try to get the
> filename of the attachment, i.e. message.getFilename (of the Part). I am not
> sure if there is other way to get the filename of the attachments. The email
> header certainly does not contain the filename of the attachment.


I think there is no easy solution to your problem.

The only idea I have is the following:

- Check wether the MimeMessage you get is a MimeMessageWrapper (it
should if it's read from the repository), if it's a MimeMessageWrapper
then change the MimeMessageWrapper code to give you visibility of the
source "MimeMessageSource source = null;" (now it has package visibility)

- Parse the message source with a different mime library (mime4j:
http://mime4j.sourceforge.net/, look for the  MimeStreamParser class).
Mime4J should be more memory friendly than javamail.

I'm not sure this will work or even fix the memory problem, but this is
the first attempt I would do.

Let us know of your progress!

Stefano

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to