 <p>The "correct" way according to the Java EE architecture would be to have a JCA connector to do inbound/outbound connection with the SMTP server. </p> <p>The JCA connector can do whatever you want, including threading and connection to external systems with sockets. Actually JMS is just a special kind of JCA connector that connects to JMS broker and delivers message to "regular" MDB. A JCA connector can then poll the SMTP server and delivers the message to a custom MDB. </p> <p>The best document about JCA is <a href="http://developers.sun.com/appserver/reference/techart/resource_adapters.pdf" rel="nofollow noreferrer">Creating Resource Adapters with J2EE Connector Architecture 1.5</a>, and it does actually use the example of email delivery. Luck you :) I suggest you have a look at it. The code can be found as part of the Java EE samples and uses JavaMail, but I don't know if it's production ready. </p> <p>Related: </p> <ul> <li><a href="http://stackoverflow.com/questions/2998926/new-to-jee-architecture-suggestions-for-a-service-daemon">Java EE architecture suggestions for a service/daemon?</a></li> <li><a href="http://stackoverflow.com/questions/2154490/an-ear-jee-application-which-listen-to-a-socket-request">Java EE application which listen to a socket request.</a></li> </ul>