Friday, December 24, 2004 02:38 AM
That is something you should do on your server where you receive your mail.... Make a cron-job, and let it execute sendmail. You cannot have a servlet detect if you got mail.... A servlet handles a client request, not respond to mail....
All that is left is the ugliest solution I have ever seen, and that is to start your servlet, let it run in an endless loop, and let the servlet check your mailbox using JavaMail..... Still I wonder what happens if your session expires and your appserver kills the servlet