I'm having a bit of trouble with an e-mail account today, unable to download messages. The problem with these kinds of issues is that it is hard to be sure if the problem is with the mail server, or with your e-mail client. To check that it wasn't my e-mail client, I used some code from a jGuru JavaMail API tutorial.
40 lines of code later (copied directly from the tutorial; I just added a couple of import statements) and I was able to confirm that it was the mail server causing me the problem, not my e-mail client. Very useful.