I can read emails with the idIMAP component with code like this:
IMAP.SelectMailBox('INBOX');
IMAP.StatusMailBox('INBOX', IMAP.MailBox);
if IMAP.MailBox.UnseenMsgs > 0 then ...
But, because the emails are over 3.000 (that increases about of 100 emails per month) this code:
IMAP.SelectMailBox('INBOX');
runs for about three minutes and more.
This code read even the email readed even I don't want to do anymore.
I needs to repeat read new email ever 10 minutes but i will lost about 3 minutes every time due to IMAP.SelectMailBox('INBOX'); even I don't have new emails.
What is the best strategy to avoid to lost about 3 minutes every time i do: IMAP.SelectMailBox('INBOX');
Thanks
IMAP.SelectMailBox('INBOX');
IMAP.StatusMailBox('INBOX', IMAP.MailBox);
if IMAP.MailBox.UnseenMsgs > 0 then ...
But, because the emails are over 3.000 (that increases about of 100 emails per month) this code:
IMAP.SelectMailBox('INBOX');
runs for about three minutes and more.
This code read even the email readed even I don't want to do anymore.
I needs to repeat read new email ever 10 minutes but i will lost about 3 minutes every time due to IMAP.SelectMailBox('INBOX'); even I don't have new emails.
What is the best strategy to avoid to lost about 3 minutes every time i do: IMAP.SelectMailBox('INBOX');
Thanks