Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAPI class and reading email from outlook express
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
MAPI class and reading email from outlook express
Miscellaneous
Thread ID:
00248808
Message ID:
00248808
Views:
63
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
Next
Reply
Map
View

Click here to load this message in the networking platform