login about faq

I would set timeout greater then 60000 ms. I have used the method 'put_ConnectTimeout(300) or putConnectTimeout(300000)', but nothing... the timeout is always 60000 ms.

I have seen this link: https://www.chilkatsoft.com/p/p_407.asp and setted IdleCheck at 120000 but nothing...

I can set timeout at infinite ? How ?

This is my code:

  m_imap->put_ConnectTimeout(300);
   m_imap->idleCheck(120000);
   m_imap->SelectMailbox(pszFolder);

   m_messageSet = 0;
//  We can choose to fetch UIDs or sequence numbers.
bool fetchUids;
fetchUids = true;
//  Get the message IDs of all the emails in the mailbox
   CString filter;
   if (lDateFrom>0 || lDateTo>0)
   {
         if (lDateFrom>0 && lDateTo>0)
                filter.Format("SENTSINCE %d-%s-%d SENTBEFORE %d-%s-%d",fnday(lDateFrom),GetMonth(lDateFrom),fnyear(lDateFrom,0),fnday(lDateTo),GetMonth(lDateTo),fnyear(lDateFrom,0));
         else
         {
                if (lDateTo>0)
                       filter.Format("SENTBEFORE $d-%s-%d",fnday(lDateTo),GetMonth(lDateTo),fnyear(lDateTo,0));
                else
                       filter.Format("SENTSINCE %d-%s-%d",fnday(lDateFrom),GetMonth(lDateFrom),fnyear(lDateFrom,0));
         }
   }
   else
   {
         filter="ALL";
   }

   //betweenDates = "SENTSINCE 01-Mar-2007 SENTBEFORE 05-Mar-2007";
   m_messageSet = m_imap->Search(filter,fetchUids);

   if (!m_messageSet || m_messageSet == 0 )
   {
         CkString ckError;
         m_imap->LastErrorText(ckError);
         sErrorMsg=ckError.getString();
    return -1;  
   }

//  Fetch the emails into a bundle object:

   if  (flSpeedReading)
         m_bundle = m_imap->FetchHeaders(*m_messageSet);       
   else
         m_bundle = m_imap->FetchBundle(*m_messageSet);

if (m_bundle == 0 ) {
    delete m_messageSet;
    return 0;
}

   int count = m_bundle->get_MessageCount();
   return count;

thanks for your answers

asked Jun 25 '15 at 02:59

Sistemi's gravatar image

Sistemi
112


The web page at https://www.chilkatsoft.com/p/p_407.asp discusses the IdleTimeoutMs property of the FTP2 class, which has nothing to do with the IMAP class.

The Imap.IdleCheck is a method. It is NOT a timeout related property.

The Imap object has 2 timeout related properties: ConnectTimeout and ReadTimeout. It does NOT have an IdleTimeoutMs property.

link

answered Jun 30 '15 at 16:08

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Jun 30 '15 at 16:08

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

Asked: Jun 25 '15 at 02:59

Seen: 558 times

Last updated: Jun 30 '15 at 16:08

powered by OSQA