Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapi, move message to another folder
Message
From
02/11/2000 10:30:31
 
 
To
31/10/2000 10:02:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00435984
Message ID:
00437117
Views:
23
Yes.

I don't find these collections in MSMAPI:

objSession.Inbox.Messages

Also I can't create the object like in the example you have:
CREATEOBJECT("mapi.session")

I create it: CREATEOBJECT("MSMAPI.MAPISession")



>Hi
>
>I have an example of reading mail from inbox. I think that mayve we can replace inbox with outbox or other folder to do the job. But in my case I try and this is not working, I suspect that I have another problem. My outlook express is french version so the inbox folder is name "Boîte de réception". Maybe that's why this is not working
>
>
>* AM_MessageFilter.PRG
> * --------------------
> *
> *Create a MAPI Session object then Logon. The Logon dialog can be
> *bypassed by providing a valid ProfileName as the first parameter
> *(as a string) to the Logon Method as seen below.
> objSession = CREATEOBJECT("mapi.session")
> objSession.Logon &&objSession.Logon("YourProfileName")
>
> *Instantiate a MessageFilter Object on the Inbox's Messages collection
>
> objMsgColl = objSession.Inbox.Messages
> *** in the line before you can try outbox.
>
> objMsgFilter = objMsgColl.Filter
>
> *Setup the criteria for the MessageFilter
> objMsgFilter.Text = "test test"
> objMsgFilter.Unread = .T. && Filter for unread messages
>
> *By default the two conditions noted above are logically ANDed, this
> *can be changed however to a logical OR instead by uncommenting the
> *next line
> *objMsgFilter.Or = .T.
>
> *Message filter is now specified; ready for display loop
> FOR EACH objMess IN objMsgColl && Operates only on messages post filter
> MESSAGEBOX("Message not read: " + objMess.Subject)
> NEXT
>
> *Clean up then bail
> objSession.Logoff
> RELEASE objMessage, objMsgFilter, objMsgColl, objSession
>
>You can also check this web site where I found vb sample. The chapter 11 talk about moving message to other folders. You can check other chapter.
>
>http://www.eed.usv.ro/misc/doc/prog/windows/MAPI_SAPI_TAPI/ch11.htm
>
>If you find something working please let me know.
>
>
>Michel
>
>>I didn't know you could do it with MAPI.
>>I would like to do that.
>>Can you send the piece of VB code ?
>>
>>
>>I would also like to read messages from other folders than the Inbox. Do you know how to do it ?
>>
>>
>>
>>>Hi
>>>
>>>I use the mapi object found in the files section and I am able to read email and save attachment using Visual Foxpro. Now I want to move the message that I just read to another folder.
>>>
>>>Maybe someone have already to this. I have some vb sample but it seem not to work. I will be glad to have some help.
>>>
>>>Thanks
>>>
>>>Michel
Previous
Reply
Map
View

Click here to load this message in the networking platform