2

Is anyone aware of any API's that implement an imap watcher? I.e which keeps an open connection to an imap mail server and amongst other things, will tell me if, for example, a new mail has arrived.

I am more than happy to write my own if none exists, but not quite sure where to start. Would it be just a matter of sending a NOOP command and if new mails have arrived then the appropriate response would be sent anyway?

Umair
  • 3,063
  • 1
  • 29
  • 50

1 Answers1

3

Commercial

Mail.dll Library (from Pavel Lesnikowski) supports IMAP IDLE command, a method that blocks untile an email arrives.

Example code here

Open-source

The InterIMAP library seems to have support for this through new messages request, but it's not out of the box. Worth the check though.

Community
  • 1
  • 1
CharlesB
  • 86,532
  • 28
  • 194
  • 218