go - Any better way to watch imap email box update? -


i have tried imap idle way, works in time, but:

  1. sometimes it's missing event... status updated idle watched it's delayed message, make script confused.
  2. the email isp close imap conneciton, connection maybe last serveral minutes.
  3. when lots email rush in, such 1 email per seconds. idle status missing lot's event.

i know maybe should blame email isp, there better way can email notification in time , reliable.

or use hard way, long loop check email?

idle doesn't tell there 1 new message, tells happened. may 1 new message, or ten, may 1 message being deleted, or ten, or may change. it's check. (if want test how code handles it, can cause large changes using uid copy , expunge.)

connections being closed problem solve. imap server can close connection (for or bad reasons), it's done nat middlebox belonging customer. client can reconnect solve nat problem, , solving nat problem solves server problem too, side effect.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -