Skip to main content

JavaMail 1.5 JCP MR

  8 posts   Feedicon  
Replies: 7 - Last Post: March 09, 2013 00:56
by: Bill Shannon
showing 1 - 8 of 8
Posted: February 22, 2013 23:41 by Bill Shannon
A JCP Maintenance Review is underway to create JavaMail 1.5.
You can find the details on the JCP site:

Feedback is encouraged!
Posted: February 27, 2013 20:27 by dres
One thing that may be in the API but I just cannot find is how to get any custom attribute from an IMAP message. If this is not available, it would be nice for 1.5 to include it. I thought that FetchProfiles served this purpose but I can't find a way to access the data after performing a fetch call. It seems only the standard envelope attributes, content, etc... are accessible.

Correction: I see how it is done in the new gimap provider but it doesn't seem very convenient. Subclassing FetcProfile.Item etc...
Posted: February 28, 2013 05:47 by Bill Shannon
Well, of course, you don't need to subclass anything to use it.
It works pretty much the same as the standard fetch attributes.

Accessing the non-standard attributes available through the non-standard
Gmail protocol extensions requires using the Gmail-specific classes.

Other than promoting all the Gmail-specific attributes and methods to
the standard API, what would make it more convenient to use?
Posted: February 28, 2013 17:08 by dres
I haven't used the gimap protocol yet but I looked at how it was implemented. I'm using gmail but using the plain imaps protocol. It seems from the gimap implementation that FetchProfile.Item must be subclassed because the constructor is protected. I'm not sure if anything else is necessary because I haven't got it working yet.
Posted: March 01, 2013 05:08 by Bill Shannon
The subclassing has already been done by the implementation, you don't need
to do it in your application. Just use GmailFolder.FetchProfileItem.MSGID,
as described in the javadocs.
Posted: March 03, 2013 19:18 by dres
What I'm saying is that what if we want to support an extended attribute other than the ones in the gimap protocol? Subclassing for each attribute seems onerous. Frankly I haven't really found any functionality in the gimap protocol that would justify all the classes.

It seems that the IMAPProtocol and IMAPMessage themselves should support fetching arbitrary attributes. It would seem to be more inline with the IMAP rfc in the way it provides for extension without altering or creating a new protocol.
Posted: March 04, 2013 04:02 by Bill Shannon
The problem is the IMAP protocol itself provides no way to discover these attributes.
Gmail-specific protocol extensions were required for the Gmail-specific attributes.
The same would be true for other mail servers, but the specific protocol mechanisms
might be completely different.

There's a standard way to discover folder attributes, and you can access those without
using the Gmail extensions.
Posted: March 09, 2013 00:56 by Bill Shannon
I've posted the DRAFT JavaMail 1.5 javadocs here.
You'll find a link in the left navbar as well.
showing 1 - 8 of 8
Replies: 7 - Last Post: March 09, 2013 00:56
by: Bill Shannon
Please Confirm