go - Any better way to watch imap email box update? -
i have tried imap idle way, works in time, but:
- sometimes it's missing event... status updated idle watched it's delayed message, make script confused.
- the email isp close imap conneciton, connection maybe last serveral minutes.
- 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
Post a Comment