login about faq

Hi, my question belongs to imap.search component.

I'm having a program running which graps all new emails via imap.Search("NEW",1)

The program is not disconnecting from the imap server, instead connection keeps alive so imap.Search is called again and again on every iteration of the program.

The search looks like that:

ChilkatLog:
  Search:
    DllDate: Dec 29 2015
    ChilkatVersion: 9.5.0.55
    UnlockPrefix: XXX
    Username: XXX
    Architecture: Little Endian; 64-bit
    Language: Windows Java
    VerboseLogging: 0
    criteria: NEW
    criteriaUtf8QP: NEW
    connectedTo: XXX
    selectedMailbox: Inbox
    bUid: 1
    Command: aaad UID SEARCH NEW
    numMessages: 0
    Success.
  --Search
--ChilkatLog

NEW ITERATION:

0

ChilkatLog:
  Search:
    DllDate: Dec 29 2015
    ChilkatVersion: 9.5.0.55
    UnlockPrefix: XXX
    Username: XXX
    Architecture: Little Endian; 64-bit
    Language: Windows Java
    VerboseLogging: 0
    criteria: NEW
    criteriaUtf8QP: NEW
    connectedTo: XXX
    selectedMailbox: Inbox
    bUid: 1
    Command: aaae UID SEARCH NEW
    numMessages: 0
    Success.
  --Search
--ChilkatLog

NEW ITERATION:

0

ChilkatLog:
  Search:
    DllDate: Dec 29 2015
    ChilkatVersion: 9.5.0.55
    UnlockPrefix: XXX
    Username: XXX
    Architecture: Little Endian; 64-bit
    Language: Windows Java
    VerboseLogging: 0
    criteria: NEW
    criteriaUtf8QP: NEW
    connectedTo: XXX
    selectedMailbox: Inbox
    bUid: 1
    Command: aaaf UID SEARCH NEW
    numMessages: 0
    Success.
  --Search
--ChilkatLog

I'm confused from the "Command line" in this example like the last command: "aaaf UID SEARCH NEW"

What is this ID doing here?

Because when I'm doing a shutdown of the program, everything will be closed and also a disconnect of the imap server will be done and at that point chilkat is doing some kind of closing? for each search request?!

like that:

aaad OK SEARCH completed.
----IMAP REQUEST----
aaae UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaae OK SEARCH completed.
----IMAP REQUEST----
aaaf UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaaf OK SEARCH completed.
----IMAP REQUEST----
aaag UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaag OK SEARCH completed.
----IMAP REQUEST----
aaah UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaah OK SEARCH completed.
----IMAP REQUEST----
aaai UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaai OK SEARCH completed.
----IMAP REQUEST----
aaaj UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaaj OK SEARCH completed.
----IMAP REQUEST----
aaak UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaak OK SEARCH completed.
----IMAP REQUEST----
aaal UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaal OK SEARCH completed.
----IMAP REQUEST----
aaam UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH
aaam OK SEARCH completed.
----IMAP REQUEST----
aaan UID SEARCH NEW
----IMAP RESPONSE----
* SEARCH 538
* 1 RECENT

As this can take a while (depends on the time the program was running) my questions is how to avoid this?

Thanks a lot!

asked Jul 18 at 08:28

martl's gravatar image

martl
1

Be the first one to answer this question!
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:

×175
×13
×9
×8

Asked: Jul 18 at 08:28

Seen: 220 times

Last updated: Jul 18 at 08:28

powered by OSQA