I have a JSF page and I would like to implement in my topbar a new panel for emails:
My idea is that I will execute a function every 5 minutes and check for new mails (polling).
The question is now for me: Is there already a function from the mail java API in place?
If not, than I have an idea in my mind, like the following: - I will save the latest UUID from the message in a @SessionBean. - I will call every 5 minutes my EJB Container for checking if there is a new email in place.
I think I can use here getMessagesByUID(long start, long end)
- "long end" is than my ID which I have in my @SessionBean.
- "long start" -> is than 0?
Many thanks for help