General information
Category:
Internet applications
Title:
MAPI - Inbox, OutBox, SenItems Folders in Outlook Express &
1) I can get my 'Inbox' email with my 'ShowInboxMail' function below, how can I access the email in 'Outbox' & 'SenItems'?
2) My Window 98SE PC install with 'Outlook Express' & 'Outlook 2000', and the 'Outlook Express' is set as the default e-mail program. My 'ShowInboxMail' function will display the 'Outlook Express' Inbox email for the first run only, when I run it again, it will switch to 'Outlook 2000' Inbox email, why? (I notice the oSession.sessionid also change automatically.)
FUNCTION ShowInboxMail()
oSession = CREATEOBJECT("MSMAPI.MapiSession")
oMessage = CREATEOBJECT("MSMAPI.MapiMessages")
oSession.SignOn()
oSession.NewSession = .F.
WITH oMessage
.SessionID = oSession.SessionID
.FETCH()
? 'Mail : '+STR(.MsgCount)
? '--------: '
FOR liLoop = 0 TO .MsgCount-1
.MsgIndex = liLoop
?
? 'Date : '+.MsgDateReceived
? 'Address : '+.MsgOrigAddress
? 'Name : '+.MsgOrigDisplayName
? 'Subject : '+.MsgSubject
ENDFOR
ENDWITH
oSession.SignOff()
ENDFUNC
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only