I am aware that Google App Engine can capture email and fire a function, but I would like this functionality in a Tomcat, Glassfish, or any other Java server.
I would like to avoid setting up a mailbox and running a cron job every few seconds or minutes. A Java class and some server configuration would be ideal, but I have no idea where to start (or if I'm looking in the right direction for the solution). Maybe the solution is language-independent if the host can POST a url such as /mailHandler
when a message is received.
Any help would be greatly appreciated. Thanks! :)