Search The ForumSearch   RegisterRegister  LoginLogin

MailBee IMAP4

 AfterLogic Forum : MailBee IMAP4
Subject Topic: Connect method hangs client Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Ed Carp
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 29 April 2006 at 2:19am | IP Logged Quote Ed Carp

When using the Connect method, until the client actually connects to the server or returns an error or times out, the client doesn't respond to any other events (mouse clicks, etc.) - it appears to block. We're using the following code:

    Set oMailer = New MailBee.IMAP4
    oSSL.UseStartTLS = True
    oSSL.Protocol = 4
    Set oMailer.SSL = oSSL
    oMailer.ServerName = "xxx"
    oMailer.UserName = "yyy"
    oMailer.Password = "zzz"
    oMailer.Timeout = 600
    oMailer.Connect

Is there something else we should be doing? Thanks in advance!
Back to Top View Ed Carp's Profile Search for other posts by Ed Carp
 
Ed Carp
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 29 April 2006 at 2:24am | IP Logged Quote Ed Carp

On further investigation,, it appears that the IMAP component blocks on every communication with the server - getting a list of folders, retrieving lists of UIDs, etc.
Back to Top View Ed Carp's Profile Search for other posts by Ed Carp
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 29 April 2006 at 4:34am | IP Logged Quote Alex

You can set IMAP4.EnableEvents=True prior to connecting to the server. In this case, Windows events will still be processed while MailBee communicates with the server. However, you should accurately test your application in this case and avoid all "problem" scenarios such as when user clicks a button, the operation starts, and then user clicks the same button again (but the current operation is not finished yet).

You can find complete sample (VB6/VB.NET/C#)of usage IMAP4 component asynchronously in IMAP4 Demo #2 (by default, VB6 version is installed in "C:\Program Files\MailBee\Samples\VB6\IMAP4 Demo 2").

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide