login about faq

Is there a way (sample code) in vb(6) interface to ChilkatImap to get push alerts rather than polling every few

minutes

I have an email app that polls to check for new google email every few minutes but would rather have an instant

notice like on smart phones of new mail. A push alert ref: http://www.isode.com/whitepapers/imap-idle.html

email vb6 ChilkatImap

Thanks,

asked Oct 30 '13 at 10:09

Wizzy's gravatar image

Wizzy
1112


Please read this: http://www.chilkatforum.com/questions/4391/how-to-trigger-an-event-that-calls-my-application-when-something-external-happens

and then think about how it could be possible to receive Push alerts. The only possible way is to either poll the socket, or to be waiting indefinitely in a socket read operation waiting for a notification to arrive.

An application would do this by creating a background thread to wait for data to arrive on the socket. Of course, when it does, it's an untagged IMAP response such that the content of the response would need to be communicated in some way to the application so that the application could take the appropriate response.

You can see how the client-server IDLE mechanism works here:

               C: A004 IDLE
               S: * 2 EXPUNGE
               S: * 3 EXISTS
               S: + idling
               ...time passes; another client expunges message 3...
               S: * 3 EXPUNGE
               S: * 2 EXISTS
               ...time passes; new mail arrives...
               S: * 3 EXISTS
               C: DONE
               S: A004 OK IDLE terminated
If Chilkat was to introduce IDLE functionality, it would have to be in three method calls:

  1. A method to initiate IDLE.
  2. A method to wait for any untagged responses, perhaps waiting indefinitely, but this is still a polling operation where the poll time can be from 0 seconds to infinite. The caller would need to know what to do with one or more untagged responses.
  3. A method to terminate the IDLE.

Unless your program is multi-threaded, there's really no point in implementing IDLE because you're still going to be doing periodic polling. If you didn't then your program's thread of execution would be simply waiting on the connected socket (and it would be doing nothing else).

At this time, Chilkat has not implemented IDLE. It may do so in the future, but it's a piece of functionality that requires more effort and understanding on the part of the application developer, and it does not even make sense unless the IDLE functionality happens in a background thread.

link

answered Oct 30 '13 at 11:04

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

I hope the offer this in future!! Low background local polling better than polling Google server constantly which is what I've implemented. (every 4 minutes poll google email - so long wait for email notice, I hear my iPhone ding instantly on new message) I'm just looking for an alert (new mail) then can retrieve additional info.

link

answered Oct 30 '13 at 11:12

Wizzy's gravatar image

Wizzy
1112

edited Oct 30 '13 at 11:14

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×174
×9
×1
×1
×1

Asked: Oct 30 '13 at 10:09

Seen: 1,336 times

Last updated: Oct 30 '13 at 11:14

powered by OSQA