I tried synchronous calls now and discovered that event trigger is not
necessary related to UIDL after LIST:

SyncPop3Cli1->Host = "pop3.host.name";
SyncPop3Cli1->Port = 110;
SyncPop3Cli1->UserName = "username";
SyncPop3Cli1->PassWord = "password";
SyncPop3Cli1->ConnectSync();
SyncPop3Cli1->UserSync();
SyncPop3Cli1->PassSync();
SyncPop3Cli1->StatSync();
Memo1->Lines->Add("Messages: "+IntToStr(SyncPop3Cli1->MsgCount));
SyncPop3Cli1->ListSync();
SyncPop3Cli1->QuitSync();

I put this on some button. The first time I call it List works (or if the
program is restarted). The second time I call it, all works except that List
does not trigger events again. Same goes if I replace it with UidlSync,
again works the first time, no event trigger the second time.

Now, unless I didn't do some necessary cleanup between two calls, this
should work when called twice in a row without restarting a program (which
only destroys and creates Pop3 component). So my guess is that there is an
issue related with UIDL, LIST and repeated calls one after another...

I also tried to set or clear event handlers:

SyncPop3Cli1->OnListLine = NULL;
SyncPop3Cli1->OnUidlLine = NULL;
SyncPop3Cli1->OnListLine = SyncPop3Cli1ListLine;
SyncPop3Cli1->OnUidlLine = SyncPop3Cli1UidlLine;

In various combinations, to see if setting or releasing event handler would
do any change - no change.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to