The Mapi Class you made is a Great piece of work, really helpful. I'm using it to read mail via outlook express. It works well, except for one error message that pops up, i can ignore it and the class will be able to read the mail. Maybe you have an idea on how to get rid of it, here is the error message:
OLE IDispatch exception code 0 from MAPIMessages: Invalid message.
I call the mapi class with the following line: thisform.mapi1.readmail
And here is the part of code(from your class) where the error happens, following it in the debug told me that the FETCH() line is the one where the error occurs.
*********************
THIS.oMessage=CREATEOBJECT("MSMAPI.MAPIMessages.1")
WITH THIS.oMessage
.SessionID=lnSessionID
.FetchUnreadOnly=llUnreadOnly
.Fetch()
ENDWITH
THIS.nMessageCount=THIS.oMessage.MsgCount
lnTotalMessages=THIS.nMessageCount
IF llFilter=.T.
lnTotalMessages=THIS.FilterMessages()
ENDIF
********************
Any ideas what could be wrong? Even if it says "invalid message" every message in my inbox is read fine by the class when clicking the "ignore" button.
Thank you.
--
Steven Boudreault