Tools like BaseCamp, FogBugz & Jira have features where you can send an email to the server on a special address, and it will monitor this address and respond to mails received... e.g Jira let's you create a new bug-report by email, BaseCamp will append an email to a discussion thread, even figuring out the right thread based on the email contents.
If you had a Java web-app, how would you go about adding this functionality? A separate app which somehow polls a mailbox? A script which runs a Java app every few seconds?
What Java standard classes can be used here for the email parts? And is it mandatory that you already have a mail-server running so you can allocate an email account for the app, or do any of these apps provide their own lightweight email servers?