01-28-06 02:28 AM
Steve,
One way to do this is to let the Encoded MIME message come into an
orchestration, and then execute a series of Receive Pipelines in the
orchestration to extract the different parts of the email message as
explained below:
1) On your POP3 Receive Location Adapter Properties :
Set the Apply MIME Decoding property = False
2)
i) In a BizTalk Project, add a receive Pipeline (Can call it
ReceivePipelineBody)
and then drag a MIME/SMIME decoder from the toolbox into the Decode Section
of the Receive Pipeline.
For the properties of the MIME/SMIME decoder, set the :
Body Part Index = 0
This will extract out the Body part of the message
ii) In the same BizTalk Project, add a receive Pipeline (Can call it
ReceivePipelineAttachement)
and then drag a MIME/SMIME decoder from the toolbox into the Decode Section
of the Receive Pipeline.
For the properties of the MIME/SMIME decoder, set the :
Body Part Index = 2
This will extract out the Attachement part of the message
iii) Add an orchestration to the BizTalk project and then have it
Receive the initial Encoded message from the Receive Port/Location discussed
in 1).
In this Orchestration add a Expression shape with something like the below
to execute the receive Pipelines to extract out the different parts of the
Email message :
// First get the attachement.
varPipelineOutPutMessages =
Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof
(Mod1BizTalk.ReceivePipelineAttachment), msgEmail);
varPipelineOutPutMessages.MoveNext();
construct msgAttachement
{
msgAttachement = null;
varPipelineOutPutMessages.GetCurrent(msgAttachement);
}
// Next get the body of the message
varPipelineOutPutMessages =
Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof
(Mod1BizTalk.ReceivePipelineBody), msgEmail);
varPipelineOutPutMessages.MoveNext();
construct msgBody
{
msgBody = null;
varPipelineOutPutMessages.GetCurrent(msgBody);
}
If looking for an example on how to execute a Receive Pipeline in an
orchestration.
there is an example in the BizTalk 2006 SDK as here:
C:\Program Files\Microsoft BizTalk Server
2006\SDK\Samples\Pipelines\ComposedMessa
geProcessor
Matt
"Steve Harclerode" wrote:
> Is there a way similar to this to get the actual body of the message? I'd
> like to be able to use it. In my case, the email itself is plain text, and
> the attachment is XML.
> (I already am succesfully processing the XML attachment).
>
> Thanks,
> Steve
>
> "Matt Meleski" <MattMeleski@discussions.microsoft.com> wrote in message
> news:2FDDEEB8-F91F-4C46-BE1D-062D3DEA8EF0@microsoft.com...
>
>
>
[ Post a follow-up to this message ]
|