Hi,

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 need this because I need to extract attachment of the email to store in
shared central repository based on certain criteria of the email. I am doing
project for my client with this kind of requirement.

Thanks.

Regards,
Edward

On 12/30/05, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
>
> > Is it possible to store it into temporary file? Using more memory does
> not
> > guarantee the stability, unless the email size is limited. But this is
> not
> > practical since it reduces James scalability. In a very busy server
> where
> > there many (~ 100 users at any time at peak), it can make the heap
> exhausted
> > very fast.
>
> This is not possible because is not handled in james but in javamail.
> You are using getFlags that is a javamail method. Maybe in james 3.0 (a
> lot of months away) we'll try to remove javamail from james but you will
> not have the getFlags() method and other javamail specific operations.
>
> You can limit the maximum message size and the number of spool threads
> to limit the maximum memory usage.
>
> Maybe a different workaround for your problem does exists: why are you
> using getFlags()? what do you read/store in mimemessage flags? Can you
> use the Mail's attributes for the same purpose? Mail's attributes don't
> need javamail to be invoked (we don't need to even parse the
> mimemessage) and is more memory friendly.
>
> Stefano
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to