StreamingMarkupBuilder and IMAP client example Add comment to Wiki View in Wiki Edit Wiki page Printable Version

The following groovy code example shows how get email messages from an IMAP server and transform the message structure and data into XML. It took me a ridiculously long time to get this working, so I thought it would be a good idea to share the code with others. ;-) Processing complex messages with javax.mail API is no fun and there is a lot in StreamingMarkupBuilder (and groovy) which simply seems to get over my head.

The code below has been structured so that the IMAP client implementation is nicely separated from the markup building code using  something, which to me looks a lot like the old school call-back mechanism used in the C language. Now, how groovy is that?

Any comments are welcome, of course!

 

Search

Results of your search request can come from various sources: the Groovy website itself, the JIRA issues, the API documentation, as well as a few other interesting Groovy-related blogs.

  By  -  pages  -  views  - last modified