[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-discuss] Which application uses GNU JavaMail ?

From: Cedric Hyppolite
Subject: Re: [Classpathx-discuss] Which application uses GNU JavaMail ?
Date: Wed, 15 Feb 2006 21:08:18 +0100

Great !
The patch work fine the listing of folders.

However the type is still 2. The type is initialized in the constructor so the added code for setting the type is not executed.

I think the following in getFolders

       int etype = entry.isNoinferiors() ?
          Folder.HOLDS_MESSAGES :
should be replaced with
       int etype = Folder.HOLDS_FOLDERS | Folder.HOLDS_MESSAGES;

as this is only called from the listing function and creates only valid mailboxes.


Le 15 févr. 06 à 20:19, Chris Burdess a écrit :

Cedric Hyppolite wrote:
I used tcpflow with Gnu provider. Sun did take into account the mail.debug property so I got the command directly.

Sun provider does:
A6 LIST "" "INBOX/%"
* LIST () "/" INBOX/sent-mail
* LIST () "/" INBOX/Pouic
* LIST () "/" INBOX/spam
* LIST () "/" INBOX/NonSpam
* LIST () "/" INBOX/Apple
A6 OK LIST completed

where Gnu provider does:
* LIST () "/" INBOX
A10 OK LIST completed

These should be equivalent according to the IMAP4 spec. However, I attach a patch against CVS HEAD that should resolve this issue, if you wouldn't mind testing it.

- Another difference is that Sun provider gives the folder a type 3 (holds folder & messages) where Gnu provider gives a type 2 (holds message).


- Sun provider throws a FolderNotFoundException on listing of the personal/user/shared namespace, where Gnu gives an empty array. I prefers the GNU provider behaviour.


- On the logging problem: I am running under Eclipse, but that should not prevent logging from working as I use commons-logging and log4j without problems.

GNU JavaMail uses the standard java.util.logging package which is not the same as log4j. I don't know how Eclipse handles it, perhaps you could try running from the command line?

On the folder type issue, I guess everything (but the root) should be of type 3 even if there is no 'inferior' folder for now i.e. the API says for HOLDS_FOLDER: 'This folder CAN contain other folders'.

I agree. I've also incorporated that algorithm into the patch. Let me know if this solves your problems, if so I will commit it.
犬 Chris Burdess
  "They that can give up essential liberty to obtain a little safety
  deserve neither liberty nor safety." - Benjamin Franklin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]