Please use a local emailserver for testing.
Gmail will ban you for 15 minutes when you've logged in. You can not make another login within that 15 min. window.
http://www.hmailserver.com/[
^]
Please be aware that also this one has a ban option, that you should switch off in the settings.
If I remember correct you an simply access the message by retriving the content - unless it's HTML, which needs some special treatment.
String strContent = (String)message.getContent();
Please also read here:
Fundamentals of the JavaMail API[
^]