Author |
|
Ed Carp Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 29 April 2006 at 2:19am | IP Logged
|
|
|
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 |
|
|
Ed Carp Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 29 April 2006 at 2:24am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 29 April 2006 at 4:34am | IP Logged
|
|
|
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 |
|
|