Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29929

java mail: check for new messages e.g. every 5 minutes [closed]

$
0
0

I have a JSF page and I would like to implement in my topbar a enw panel for emails: enter image description here

The idea is that I will execute a function every 5 minutes and check for new mails.

The question is now for me: a) Is there already a function in place? b) Another idea is: 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.

If I cast to an IMAPFolder and use getMessagesByUID(long start, long end) is this working? long end is than my ID which I have in my @SessionBean.

But what is "long start" than in this case? Which value should I add here?

Many thanks for help


Viewing all articles
Browse latest Browse all 29929


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>