Re: How to modify the contents of a message submitted by Outlook for internal delivery

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Victor Ivanidze (no_at_spam.please)
Date: 08/05/04


Date: Thu, 5 Aug 2004 17:06:20 +0400

As you are talking about _internal_ messages, you could modify their content
while receiving, using Exchange store event sink.

-- 
Regards,
Victor Ivanidze,
software developer
www.ivasoft.biz
"Simon Bates" <stb@softalk.ws> wrote in message
news:c38c8e13.0408050226.5e9e61f3@posting.google.com...
> I have seen this question touched upon by lots of newsgroup postings
> but no-one has ever come up with a definitive answer. There must be an
> expert out there that can help:
>
> I am trying to write some code to modify the contents of internal
> messages submitted by Outlook. We use Outlook/Exchange 2000. I have
> successfully written code to trap the event in OnMessageSubmission and
> I have a IMailMsgProperties interface to play with. Using
> WriteContent(), I can modify messages that are submitted for external
> delivery from a MAPI client and I can modify messages that are
> submitted for internal/external delivery using an SMTP client (such as
> Outlook Express), but not ones that are submitted internally using a
> MAPI client (Outlook). I understand that messages submitted via MAPI
> are submitted directly to the store and that only a copy of the RFC822
> message is created, for the purpose of sending out through the SMTP
> transport, and making any modifications to the content (via
> WriteContent()) will not modify the MAPI message in the store. But, is
> there a way to use any of the information available to us in
> IMailMsgProperties to lookup the message in the store and modify it
> accordingly ourselves? Failing that, is there any other method of
> changing the store-held message. By the way, I know about the
> Microsoft workaround which involves routing everything through another
> SMTP virtual server and I don't want to go down that route. Please
> help anyone!!


Relevant Pages