|
|
|
date: Tue, 11 Dec 2007 09:45:45 +0100,
group: microsoft.public.exchange.development
back
Re: Exchange 2007 SP1 SDK
Looks like a bad sample I get the same result I tracked it down to them not
Flushing the stream which means the changes don't get committed so for each
section which deals with the different bodytype you need to add some code in
so the stream is flushed eg for the plain text section something like this
seems to fix the problem
try
{
// the easiest way to do the conversion in one step is
using the Convert
// method. It takes care for creating appropriate
converter stream
// and copying from one stream to another.
textToTextConversion.Convert(originalBodyContent,
newBodyContent);
newBodyContent.Flush();
newBodyContent.Close();
}
Cheers
Glen
"Michal" wrote in message
news:eaK9fI9OIHA.4136@TK2MSFTNGP03.phx.gbl...
> Hi all,
>
> I installed a few days ago Exchange 2007 SP1 SDK on 64-bit machine with
> 64-bit Exchange 2007 installed. I wanted to learn how transport agents for
> Exchange 2007 work. So I built, installed and started an SDK sample named
> "BodyConversion". However, it does not work properly in my environment. Is
> is supposed to add a disclaimers to messages received by Exchange via SMTP
> protocol, it hooks to the OnEndOfData event. In my case, it removes the
> entire content of the message body instead adding a disclaimer! I tried
> with plain text and HTML messages - I always encounter the same problem. I
> know that the agent is running, because I can debug it and when I
> uninstall it, I can receive and send emails properly.
>
> Is there anyone who could successfully run this sample or maybe someone
> who encountered the same problem?
>
> Best regards,
> Michal [Outlook MVP]
>
date: Wed, 12 Dec 2007 10:41:15 +1100
author: Glen Scales [MVP]
|
|