Fooling OOM about the "Sent" property

A

arielra

Hello everyone.

I have a problem with my VSTO2005 addin for OL2003:
We catch the MailItem.Open event and immediately cancel the open
operation, and open a form of our own. This methodology works very nice
for us for mail items RECEIVED in the mailbox, but we encounter a
problem for items we CREATE locally (and do not send anywhere). The
same piece of code that cancels the opening of the inspector just
before opening our form simply delays so the mail edit screen is
briefly shown (a couple of seconds, machine dependant).
Keeping that in mind - we followed a tip from Sue - we create not a
MailItem but a PostItem and then convert it to IPM.Message. This works
well, but recently we noticed that this does NOT work for OL clients
who work in cached mode. Bummer.
We therefore decided to take another route in fooling OL that this item
was indeed sent: we want to create a regular message item but change
the required MAPI properties to make the OOM think it is indeed "sent
== true".
Any of you have any idea which properties I need to set, if this is
even possible (within reason) or have any other explanation to any of
the freakshows I described here?

Any help will be greatly appreciated.


Ariel
(Crosspost on:
http://www.outlookcode.com/threads.aspx?forumid=4&messageid=16634 )
 
K

Ken Slovak - [MVP - Outlook]

Those properties on IPM.Note items are set by the MAPI transport and cannot
be set in code.
 
A

Ariel

I'm glad to say the I had no need to enter the labirynth of those "MAPI
transport" properties.
Seems the OOM just looks at the PR_MESSAGE_FLAGS to know if the message
was sent or not... Simply turning off the "MSGFLAG_UNSENT" flag did the
trick. (it's the first bit).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top