I'm trying to get a handle on how to retrieve a full list of messages with this class with little luck. Here's what I have:

A button which calls Socket.connect. The connection is successful.

Sub LogInSuccesfull()
        me.CountMessages
End

Sub MessageCount(count as integer)
        dim n as integer
        for n = 1 to count
              me.retrievemessage(n)
        next
        me.disconnectFromServer
End

Sub MessageReceived(id as integer, mail as EmailMessage)
        listbox.addrow email.subject
        listbox.celltag(listbox.lastindex,0) = email
End

The problem seems to be in the loop inside MessageCount. For some strange reason this does not retrieve all messages. It seems that some of the messages have id's which fall outside the range 0 - count. I can understand how this may be possible (delete a message from the server etc), so i thought I'd try another route (parsing ListMessages to retrieve message ID's).

It turns out that the ID's supplied by the ListMessages function do not correspond with the id's supplied by the MessageReceived event. WTF?

Can someone please tell me what I'm doing wrong, or supply me with a loop for MessageCount which will retrieve a full list of messages?

Cheers,
Tom

All questions and answers unless otherwise stated are in Relation to Mac OS X 10.4 and later.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to