I have tried IMAP idle way, which works in most time, but:
- Sometimes it's missing event... the status updated which IDLE watched it's a delayed message, make my script confused.
- The email ISP sometimes close the imap conneciton, connection maybe just last serveral minutes.
- When lots email rush in, such as one email per seconds. IDLE status missing lot's event.
I know this is maybe mostly should blame email ISP, but is there a better way I can get email notification in time and reliable.
or I just use hard way, long loop check email?