I've been putting together code for a simple Mail2Atom service (working from svn of a day or two ago), thought I'd better pass on the following quick notes -
I believe there is a geronimo mail libs in /lib (I could be mistaken, I've been messing with the jars a lot). Anyhow I had problems with POP3 (getSubject() was always null), fixed by replacing it with Sun's mail.jar (1.4) and activation.jar (1.1). It would be nice to have Feed.getEntry(URI id) method (if there isn't already something I've missed), maybe even a Feed.containsEntry(URI id) (noting that a feed can contain multiple entries with the same id, but in most apps this would probably be undesirable). I'm a bit puzzled by the current modelling of feed/entries - the entries are available as a List, yet order isn't significant, suggesting Set would be more appropriate, maybe even having Feed implement Set. This point wouldn't bother me, but there's no obvious way of restricting a feed to a certain number of entries, or removing the oldest - both common requirements (well, I could have done with them) for which a List, at least internally, would help...or maybe LinkedList for next/previous activity..? Any chance of making Feed.toString() a little friendlier? Like Atom as the default namespace, line breaks & indentation would be nice too... Generally everything has worked as I'd have expected, but there were these places where things could be more convenient. Hmm, a feed.crop(int length) might be handy too... In case anyone wants a nosey, my (undocumented) source so far is in: http://dannyayers.com/svn/agency/src/org/pragmatron/atommail/ ant build file at: http://dannyayers.com/svn/agency/atommail.xml servlet deployment descriptor at: http://dannyayers.com/svn/agency/atommail_web.xml Keep up the good work! Cheers, Danny. -- http://dannyayers.com
